Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Outlook and Redemption Vbscripts.

Status
Not open for further replies.

yeti

Programmer
Mar 22, 2001
33
GB
We are using the Redemption add-in for Outlook 2003 under Exchange 2003. First impressions are that it meet our requirements. However, tests show that mail sent via Redemption is not processed by our Outlook client rules. We have a rule to copy all outbound mail to a specific folder. However, when we run the VBscript code below, the message sent is not affected by the rule. Is there something wrong with this code?

Code:
Dim OutlookMessage, oItem
Set OutlookApp = CreateObject("Outlook.Application")
Set Namespace = OutlookApp.GetNamespace("MAPI")
Namespace.Logon

Set OutlookMessage = CreateObject("Redemption.SafeMailItem")
Set oItem=OutlookApp.CreateItem(0)

With OutlookMessage
 .Subject = "Test"
 .Recipients.Add "someone@somewhere.com"
 .Recipients.ResolveAll
 .HTMLBody = "This is a test"
 .Send
End With

Andrew D

 
Hello yeti,

Should change this? (Maybe your original is not as posted at this point.)
[tt]
With [red]oItem[/red]
[/tt]
regards - tsuji
 
Hi.

I've since had a response from the author of Redemption. He says that rules that run after a message is sent are not MAPI based, i.e. Outlook runs them explicitly and does not not provide an API that Redemption could use.

He suggested that, as a workaround, I can set the mailItem.SaveSentMessageFolder property to the entry id of the folder where the message must be moved after submission.

Instead of this I just modified our script to include an additional BCC recipient - pointing to a mail enabled Public Folder. This worked a treat.


 
yeti,

Thanks for the feedback. It is nice to know and doc is rare. Redemption has an edge in automation over outlook.application, only it is not in the native package. I take note on your info. Thanks again.

- tsuji
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top