Programming Outlook

D

Doctor Who

Hello I am programming Outlook using C# and I need some help to do the
following:

1. Move Items to a non-default mail folder that I created: In my case I
have created a folder called "Backup" which was created at the root
level. I have seen examples of how to access standard folders such as
the Inbox and also child folders created under the Inbox, but how do I
gain access to a custom mail folder created at the root level.

2. How can I programmatically send (properly formatted) reply emails to
emails I have received.

Thanking you in advance.
 
K

Ken Slovak - [MVP - Outlook]

Root level? Is it visible in the UI? If so it would probably be accessed as:

myFolder = oNameSpace.Folders.Item("Backup");

Formatted how?

If you get a handle to an email you can call its Reply function and get back
a reply mail item.

See www.outlookcode.com for lots of Outlook programming examples, including
C#.
 
D

Doctor Who

Thanks Ken,

I have been trying to use the reply method of the mailitem but doesn't
appear to work (or maybe I do not undertsand how it works).

In the application that I am writing I loop through all items in my
inbox and for certain emails I parse the message body and accordingly
take some actions such as move the email to another folder and
sometimes send a reply message to the originator. What I meant by
'formatted reply' was add the RE prefix to the subject of original
message, have the oroginal message in the reply's body with the email
header information and a line separator just as you get when you
manually reply to an email.

Cheers,
 
K

Ken Slovak - [MVP - Outlook]

If you use the Reply function the RE:, etc. are added automatically.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top