![]() |
If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
|
Thread Tools | Search this Thread | Display Modes |
#1
|
|||
|
|||
![]()
I add an attachment to mail when open the mail in outlook. When i double
click on a mail then attachment display in mail.But when i right click on mail select Open then i cant see the attachment while if i click on File-Save Attachments then it shows me the attachment name. Which property need to set to display the attachment |
Ads |
#2
|
|||
|
|||
![]()
Show the code you use. Are you saving the item after you add the attachment?
-- 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 add an attachment to mail when open the mail in outlook. When i double click on a mail then attachment display in mail.But when i right click on mail select Open then i cant see the attachment while if i click on File-Save Attachments then it shows me the attachment name. Which property need to set to display the attachment |
#3
|
|||
|
|||
![]()
No. I dont save the the item after adding attachment.
I add the attachment in Item_Open() eveny item-Attachments-Add(filaname); When i double click a mail attachment display in mail. WHen i right click and select open then it's not display. "Ken Slovak - [MVP - Outlook]" wrote in message ... Show the code you use. Are you saving the item after you add the attachment? -- 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 add an attachment to mail when open the mail in outlook. When i double click on a mail then attachment display in mail.But when i right click on mail select Open then i cant see the attachment while if i click on File-Save Attachments then it shows me the attachment name. Which property need to set to display the attachment |
#4
|
|||
|
|||
![]()
I dont save item when i open it. But in my outlook addin when i open a item
and add an attachment in item_open many item events called like item_open, item_write, item_read, item_attachmentadd,item_beforeattachmentsave etc If i disable item_write( avoid writing) then it other events for this item are stop. Should i disable item_write. But if i disable it then how to enable other events. "Ashish" wrote in message ... No. I dont save the the item after adding attachment. I add the attachment in Item_Open() eveny item-Attachments-Add(filaname); When i double click a mail attachment display in mail. WHen i right click and select open then it's not display. "Ken Slovak - [MVP - Outlook]" wrote in message ... Show the code you use. Are you saving the item after you add the attachment? -- 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 add an attachment to mail when open the mail in outlook. When i double click on a mail then attachment display in mail.But when i right click on mail select Open then i cant see the attachment while if i click on File-Save Attachments then it shows me the attachment name. Which property need to set to display the attachment |
#5
|
|||
|
|||
![]()
Don't disable the other events and try saving the item after you add the
attachment. -- 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 dont save item when i open it. But in my outlook addin when i open a item and add an attachment in item_open many item events called like item_open, item_write, item_read, item_attachmentadd,item_beforeattachmentsave etc If i disable item_write( avoid writing) then it other events for this item are stop. Should i disable item_write. But if i disable it then how to enable other events. "Ashish" wrote in message ... No. I dont save the the item after adding attachment. I add the attachment in Item_Open() eveny item-Attachments-Add(filaname); When i double click a mail attachment display in mail. WHen i right click and select open then it's not display. |
#6
|
|||
|
|||
![]()
I have tried to save item after adding attachment but it still dont display
attachment. I'm not saving item before adding attachment. I dont have much knowledge for outlook addin. I think it is happening due to following reason. In my addin Open a mail from inbox folder(subject- test1) add an attachment in item_open event and save this mail(test1.msg type) on hard disk(File-SaveAs) and close. Now Open test1.msg from hard disk(since test1.msg is also in Inbox folder, item_open event call 2 times). After closing this mail i found 2 mails of subject test1.msg in inbox folder. I am handling all mail events throgh Inspector. When i open a mail register inspector event in a inspector class and pass Application-CurrentInspector In Notify of inspector class register mail event(outlook::Items) Please suggest where i'm wrong "Ken Slovak - [MVP - Outlook]" wrote in message ... Don't disable the other events and try saving the item after you add the attachment. -- 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 dont save item when i open it. But in my outlook addin when i open a item and add an attachment in item_open many item events called like item_open, item_write, item_read, item_attachmentadd,item_beforeattachmentsave etc If i disable item_write( avoid writing) then it other events for this item are stop. Should i disable item_write. But if i disable it then how to enable other events. "Ashish" wrote in message ... No. I dont save the the item after adding attachment. I add the attachment in Item_Open() eveny item-Attachments-Add(filaname); When i double click a mail attachment display in mail. WHen i right click and select open then it's not display. |
#7
|
|||
|
|||
![]()
Why are you saving the item as a MSG file and then re-opening it when you
already have that item saved in Outlook? What you are doing makes no sense to me. -- 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 have tried to save item after adding attachment but it still dont display attachment. I'm not saving item before adding attachment. I dont have much knowledge for outlook addin. I think it is happening due to following reason. In my addin Open a mail from inbox folder(subject- test1) add an attachment in item_open event and save this mail(test1.msg type) on hard disk(File-SaveAs) and close. Now Open test1.msg from hard disk(since test1.msg is also in Inbox folder, item_open event call 2 times). After closing this mail i found 2 mails of subject test1.msg in inbox folder. I am handling all mail events throgh Inspector. When i open a mail register inspector event in a inspector class and pass Application-CurrentInspector In Notify of inspector class register mail event(outlook::Items) Please suggest where i'm wrong |
#8
|
|||
|
|||
![]()
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). "Ken Slovak - [MVP - Outlook]" wrote in message ... Why are you saving the item as a MSG file and then re-opening it when you already have that item saved in Outlook? What you are doing makes no sense to me. -- 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 have tried to save item after adding attachment but it still dont display attachment. I'm not saving item before adding attachment. I dont have much knowledge for outlook addin. I think it is happening due to following reason. In my addin Open a mail from inbox folder(subject- test1) add an attachment in item_open event and save this mail(test1.msg type) on hard disk(File-SaveAs) and close. Now Open test1.msg from hard disk(since test1.msg is also in Inbox folder, item_open event call 2 times). After closing this mail i found 2 mails of subject test1.msg in inbox folder. I am handling all mail events throgh Inspector. When i open a mail register inspector event in a inspector class and pass Application-CurrentInspector In Notify of inspector class register mail event(outlook::Items) Please suggest where i'm wrong |
#9
|
|||
|
|||
![]()
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). |
#10
|
|||
|
|||
![]()
Thanks it's solved now. The problem was adding attachment in Item_Open
event. When i add attachment in Inspector.Activate() then it display. I know how to use mail item event like item_open, item_close,item_fwd etc. But i dont have idea how to implement context menu operations like when i right click on any mail select any opertion like reply,forward etc. Are they handled seperately "Ken Slovak - [MVP - Outlook]" wrote in message ... 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). |
|
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
copying e-mail addresses (display names) from body of e-mail | jpampinella | Outlook - Using Contacts | 2 | February 26th 07 08:40 PM |
How do I get Outlook e-mail field to display e-mail, not name | hansgast | Outlook - Using Contacts | 8 | November 28th 06 10:42 AM |
I want photo's to display without clicking the attachment link | John Vanderwel | Outlook - General Queries | 6 | October 7th 06 08:03 AM |
won't display attachment icon when sendin email | [email protected] | Outlook and VBA | 1 | September 19th 06 02:36 AM |
Configure Outlook attachment icon to display in email header | Jean-Claude | Outlook - Installation | 1 | February 6th 06 06:30 AM |