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
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