Remnant Posted June 5, 2008 Share Posted June 5, 2008 Hi guys, I'm attempting to access to information in an email sent as an attchment. I have been using a script to access the body of an email for a while now, but due to a chnage in process out of my control, I am now recieving the emails i need to access as attachments, and I can't seem to access the body property of these. What I have been using is: $myoutlook = Objget("","outlook.application") $myNameSpace = $myoutlook.GetNamespace("MAPI") $notices = $mynamespace.getdefaultfolder(6).folders("notices") for $i = 1 to $notices.items.count $body = $notices.items($i).body ; Do stuff with the body text next I now need to access the attachments of the email, and I can't seem to treat them as an email (even though they are emails) $notices.items(1).attchments(1).body does not work Any ideas? Link to comment Share on other sites More sharing options...
Remnant Posted June 6, 2008 Author Share Posted June 6, 2008 Just spent an hour or so wading through the msdn site, and I'm going around in circles. Beginning to think that this is not possible Link to comment Share on other sites More sharing options...
ptrex Posted June 6, 2008 Share Posted June 6, 2008 @Ravenbane I am not sure if this can be done in one step ? I know that you can strip the Emails to and save them to a folder and then read the attachments. See example here : http://www.autoitscript.com/forum/index.ph...try277415"</a>">Save Attachments regards ptrex Contributions :Firewall Log Analyzer for XP - Creating COM objects without a need of DLL's - UPnP support in AU3Crystal Reports Viewer - PDFCreator in AutoIT - Duplicate File FinderSQLite3 Database functionality - USB Monitoring - Reading Excel using SQLRun Au3 as a Windows Service - File Monitor - Embedded Flash PlayerDynamic Functions - Control Panel Applets - Digital Signing Code - Excel Grid In AutoIT - Constants for Special Folders in WindowsRead data from Any Windows Edit Control - SOAP and Web Services in AutoIT - Barcode Printing Using PS - AU3 on LightTD WebserverMS LogParser SQL Engine in AutoIT - ImageMagick Image Processing - Converter @ Dec - Hex - Bin -Email Address Encoder - MSI Editor - SNMP - MIB ProtocolFinancial Functions UDF - Set ACL Permissions - Syntax HighLighter for AU3ADOR.RecordSet approach - Real OCR - HTTP Disk - PDF Reader Personal Worldclock - MS Indexing Engine - Printing ControlsGuiListView - Navigation (break the 4000 Limit barrier) - Registration Free COM DLL Distribution - Update - WinRM SMART Analysis - COM Object Browser - Excel PivotTable Object - VLC Media Player - Windows LogOnOff Gui -Extract Data from Outlook to Word & Excel - Analyze Event ID 4226 - DotNet Compiler Wrapper - Powershell_COM - New Link to comment Share on other sites More sharing options...
Remnant Posted June 8, 2008 Author Share Posted June 8, 2008 @Ravenbane I am not sure if this can be done in one step ? I know that you can strip the Emails to and save them to a folder and then read the attachments. See example here : http://www.autoitscript.com/forum/index.ph...try277415"</a>">Save Attachments regards ptrexThats what I'm looking at at the moment, and its quite a work around. Surely you can somehow tell outlook to treat the attachment as an email? Cause it is an email Link to comment Share on other sites More sharing options...
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