PDA

View Full Version : Help for forwarding mail in Outlook 2003 using VBA code



AWAN
04-19-2006, 12:20 AM
Our IT department have strict rules against the forwarding content to outside network

Any method through by Outlook VBA do the email forward & forward as attachment & redirect function instead of rules setting.


I also try to use this post for testing http://www.vbaexpress.com/forum/printthread.php?t=3209
but when it arrived a new mail for forwarding it's will prompt a popup message said "A program is trying to automatically send e-mail on your behalf. Do you want to allow it? -- If this is unexpected, it may be a virus and you should choose NO"

Can I disable this email alert? I am using MSOutlook version 2003



THANKS A LOT

Killian
04-19-2006, 02:09 AM
Hi and welcome to VBAX :hi:

The message is caused by the Outlook "Object Model Guard" and it's not possible to disable it. It is possible to use a 3rd party addin to bypass it (some are discussed here (http://www.vbaexpress.com/forum/showthread.php?t=6837)) but if your IT department have strict rules against the forwarding mails and have disabled rules (!?) I would imagine they would have something to say about installing this software.
Also in the post is a reference to using Sendkeys to "click" OK. It's an unreliable mothod but you might need to consider it if you have no other options.