Does Outlook's MailItem have a path

R

redraven

Hi,


Is there a way to open a mailitem in
Outlook with a path, like:


Outlook.MailItem oMI = (Outlook.MailItem)


outlookApplication.GetItem(@"\\Public " +
"Folders\All Public Folders\My Mail " +

"Folder\{AB12CD-342....}");
Where "{AB12CD-342....}" is the message
ID (you'd obviously need to know the exact
path and message ID before hand).


Have any of you ever come accross something
like this?


Also, is there a boolean property one can
attach to a mail or use in/on a mailitem?


Regards,
Andre


For more info:


I've got about 300,000 messages in a public
folder and would like to access a message
directly without doing a search for the
message.
 
S

Shinya

I think you are looking for CreateItemFromTemplate
dim otlkdoc as outlook.application
Set objMailItem = otlkDoc.CreateItemFromTemplate(str_FileName)'please
specify the path in str_fileName
objMailItem.display

Shinya
 
R

redraven

Hi Shinya,

No I'm actual trying to access an item in the Public Folder in
Exchange and NOT a physical file on a drive.

To rephrase my question:
Is there a way I can open an item in the Public Folder with a path
like @"\\Public Folder\myItem", as I would with a file on a normal
disk (ex. @"c:\myFile")?

Regards,
Andre
 
M

Michael Höhne

Andre,

there's no method in the Outlook object model which you can use to access an
item the way that you describe. But if you already know the message id, you
could use the Namespace.GetItemFromID method, which should do exactly what
you want.

Michael
 
R

redraven

Hi Michael,

The ID works great, but changes as soon as the item is move form one
folder to another.

Is there a constant ID or something similar?

Regards,
Andre
 

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