View Single Post
  #9  
Old March 17th 09, 08:37 PM posted to microsoft.public.outlook.program_addins
Ken Slovak - [MVP - Outlook]
external usenet poster
 
Posts: 5,848
Default Attachment not display when add to mail

There should be no difference in how an item displays no matter how it's
opened.

You never did show any of your code, so no one knows what you are doing or
how.

Assuming you want to add an attachment when an item is opened then the way
I'd do it would be something like this, in the first Inspector.Activate()
event, assuming that _inspector is your Inspector object:

Outlook.MailItem mail = _inspector.CurrentItem;
Outlook.Attachments attachs = mail.Attachments;

Outlook.Attachment attach = attachs.Add(
"c:\foobar.jpg", (int)Outlook.OlAttachmentType.olByValue, 1,"My
Attachment Picture");

mail.Save();

// now release all those objects
--
Ken Slovak
[MVP - Outlook]
http://www.slovaktech.com
Author: Professional Programming Outlook 2007.
Reminder Manager, Extended Reminders, Attachment Options.
http://www.slovaktech.com/products.htm


"Ashish" wrote in message
...
I just tell this only for knowing the reason why attachment not display.
Ok If i dont save item as msg and reopen it then i still have the save
problem for attachment(right click on a item and select open).


Ads