Results 1 to 2 of 2

Thread: [RESOLVED] Outlook - Forward an Email

  1. #1

    Thread Starter
    Fanatic Member mateo107's Avatar
    Join Date
    Jan 2005
    Posts
    547

    Resolved [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.


    -Matthew-

  2. #2

    Thread Starter
    Fanatic Member mateo107's Avatar
    Join Date
    Jan 2005
    Posts
    547

    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!


    -Matthew-

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width