wjans Posted February 22, 2007 Posted February 22, 2007 I'm trying to disable an outlook warning when trying to sent out an automated email. For each message outlook (2003) warns about 'an external program trying to send ...) In the example Delphi code this was done via : CODEOlSecurityManager.ConnectTo(outlookApp); OlSecurityManager.DisableOOMWarnings := True; try //... any action with protected objects ... finally OlSecurityManager.DisableOOMWarnings = False; end; I can't figure out how to do the .ConnectTo thing in AutoIt. Don't know much about COM either. This is what i came up with so far ... Any ideas ? Thanks in advance. ProcessWaitClose("PDFSpooler.exe") sleep(2000) ;create mail via outlook object $outlook = ObjCreate("Outlook.Application") [i]$outlooksec = ObjCreate("OlSecurityManager") $outlooksecdis = ObjCreate("OlSecurityManager.DisableOOMWarnings") $outlooksec.ConnectTo $outlook $outlooksecdis = True [/i] $objMail = $Outlook.Application.CreateItem(0) $objMail.Recipients.add($email) $objMail.Subject = $mailsubject $objMail.HTMLBody = $mailbody $objMail.attachments.add("c:\licenceautomation\report.pdf") $objMail.Display
kjactive Posted February 22, 2007 Posted February 22, 2007 (edited) I've never tried to Disable SecurityManager but try this... $outlook = ObjCreate("Outlook.Application") $outlooksec = ObjCreate("OlSecurityManager") With $outlooksec ; Create a Pool .DisableOOMWarnings = True .ConnectTo($outlook) EndWith $outlooksecdis = True ; I don't know where this is attached... $objMail = $Outlook.Application.CreateItem(0) ; Looks alright to me $objMail.Recipients.add($email) $objMail.Subject = $mailsubject $objMail.HTMLBody = $mailbody $objMail.attachments.add("c:\licenceautomation\report.pdf") $objMail.Display I don't know if this can help you in some manners but you just has to fool around and look into VB scripts as these can be ported into autoit3 com support almost without any changes... kjative Edited February 22, 2007 by kjactive Au3PP 4.1 - Autoit3 preprocessor, optimize speed, performance to scripts and do executes....[/url]Au3Calibur - Create libraries of commonly used code excerptsWords manipulate UDF, functions that is lent from the rexx language, topics and index file includedCustomDialog UDF to include custom made dialogs like a extended colorpick requester to scripts...[url="ftp://fritidshjemmet.com/Autoit3/SysColor.zip"]SysColor UDF a low level color library to manipulate RGB and Hex values...Shell32 UDF to Automate Windows® operating tasks from native dialog and Wizards browsers... Optimized the CodeWicard with options to generate browser code etc...
LOULOU Posted March 1, 2007 Posted March 1, 2007 I've never tried to Disable SecurityManager but try this... $outlook = ObjCreate("Outlook.Application") $outlooksec = ObjCreate("OlSecurityManager")With $outlooksec ; Create a Pool .DisableOOMWarnings = True .ConnectTo($outlook)EndWith $outlooksecdis = True ; I don't know where this is attached... $objMail = $Outlook.Application.CreateItem(0) ; Looks alright to me $objMail.Recipients.add($email) $objMail.Subject = $mailsubject $objMail.HTMLBody = $mailbody $objMail.attachments.add("c:\licenceautomation\report.pdf") $objMail.DisplayI don't know if this can help you in some manners but you just has to fool around and look into VB scripts as these can be ported into autoit3 com support almost without any changes...kjativeDisabling Outlook Security warning is only possible with an external programm or with redemption.dll adress http://www.dimastar>com or try a research on Google with redemption.dll like word
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now