Sign in to follow this  
Followers 0
Remnant

Outlook attachment automation

4 posts in this topic

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?

Share this post


Link to post
Share on other sites



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 :)

Share this post


Link to post
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

Share this post


Link to post
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

Share this post


Link to post
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
Sign in to follow this  
Followers 0