Jump to content

Outlook attachment automation


Recommended Posts

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

@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

Link to comment
Share on other sites

@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

Thats 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

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...