Sending Tasks with Outlook Redemtpion

CBragg

VB Dummy
Local time
Today, 06:29
Joined
Oct 21, 2002
Messages
89
We currently have the new office security patch on our servers, when we try to send a task from MS Access we get about 3 messages before this has done. To prevent this we are trying outlook redemption which uses the SafeTaskItem. Everything seems fine bar one little problem, the task wont actually send, it stays in the senders outbox waiting to be sent manually. Here's the code im using:


Dim NameSpace As Object
Dim EmailSend As Variant 'for the task item add outlook reference
Dim es As SafeTaskItem
Dim st As TaskItem
Dim safetask 'for the task item add outlook reference
Dim EmailApp As Object
Dim utils

stCallNo = [RefNo]
stUser = [User]

Set EmailApp = CreateObject("Outlook.Application") 'Outlook object
Set safetask = EmailApp.CreateItem(3) ' CreateItem(3) Task Item
Set EmailSend = CreateObject("Redemption.SafetaskItem")
Set EmailSend.Item = safetask

Set NameSpace = EmailApp.getNameSpace("MAPI")
'to the recipient

EmailSend.Subject = 'Subject goes here
stUser 'Task Subject

EmailSend.Body = 'Body goes here

EmailSend.DueDate = [FixByDate]
EmailSend.Recipients.Add Me![Fixer]
EmailSend.Assign

EmailSend.Send

Set EmailApp = Nothing
Set safetask = Nothing
Set EmailSend = Nothing
Set utils = Nothing

It seems as though the name isnt resolving properly, ive tried the ResolveAll command, this sends the task but the other person cant open it.

Any help on this would be greatly appreciated.
Thanks in advance
 
If you are using Outlook 2002 and not using Exchange Server, take a look at this:
"...Note that (see FAQ) if you are using this code with Outlook 2002, it will work flawlessly only if you run it under an Exchange Server, otherwise the message will stay in the Outbox until you click "Send/Receive" in Outlook."

Taken from this page:
http://www.dimastr.com/redemption/objects.htm

Sarge
 

Users who are viewing this thread

Back
Top Bottom