|
-
Feb 4th, 2011, 02:24 PM
#1
Thread Starter
Fanatic Member
[RESOLVED] Outlook - Forward an Email
I'm having trouble coding some new items into a program of mine. The program loops through you Inbox looking for emails that are UNREAD and have a certain subject line.
The subject line in this case, is going to search for:
"FAX TO: ###########" (actually, it just searches for FAX TO).
Next step, I need the selected email to be FORWARDED to the fax number in the subject line - including attachments.
In my code - I've already got the message selected - but I can't figure out how to programmatically forward it?
I need explicit code help with the following:
1) Check to make sure there are 10 digits in the original subject line. If not - bail out and ignore that message.
2) Trim the subject line and save the phone number to a string
3) Forward the message (plus attachments) to the [email protected]
I'm assuming I'll need to create a new Outlook.MailItem, but I'm not sure if I need to. Is there just some code I'm missing so I don't have to COPY the contents of the current MailItem to a new one.
-
Feb 7th, 2011, 08:15 AM
#2
Thread Starter
Fanatic Member
Re: Outlook - Forward an Email
#'s 1 and 2 I can take care of. #3 is the part I need the most dire help with.
Does anyone know if there is a "forward" item property for the Outlook MailItem or something similar? And if so, does anyone have some code examples? Otherwise, I think my option is to copy all of the properties to temporary variables, including the attachments, and then pass them to a NEW mail item - which I think is probably overkill.
I have searched the forums and the interwebs, but haven't been able to find anything.
Thanks!
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|