A Microsoft Outlook email forum. Outlook Banter

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.

Go Back   Home » Outlook Banter forum » Microsoft Outlook Email Newsgroups » Add-ins for Outlook
Site Map Home Register Authors List Search Today's Posts Mark Forums Read Web Partners

Attachment not display when add to mail



 
 
Thread Tools Search this Thread Display Modes
  #1  
Old March 16th 09, 11:13 AM posted to microsoft.public.outlook.program_addins
Ashish
external usenet poster
 
Posts: 94
Default Attachment not display when add to mail

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  
Old March 16th 09, 02:04 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

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  
Old March 16th 09, 02:32 PM posted to microsoft.public.outlook.program_addins
Ashish
external usenet poster
 
Posts: 94
Default Attachment not display when add to mail

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  
Old March 16th 09, 03:32 PM posted to microsoft.public.outlook.program_addins
Ashish
external usenet poster
 
Posts: 94
Default Attachment not display when add to mail

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  
Old March 16th 09, 08:21 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

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  
Old March 17th 09, 08:29 AM posted to microsoft.public.outlook.program_addins
Ashish
external usenet poster
 
Posts: 94
Default Attachment not display when add to mail

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  
Old March 17th 09, 01:19 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

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  
Old March 17th 09, 02:15 PM posted to microsoft.public.outlook.program_addins
Ashish
external usenet poster
 
Posts: 94
Default Attachment not display when add to mail

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  
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).


  #10  
Old March 18th 09, 10:26 AM posted to microsoft.public.outlook.program_addins
Ashish
external usenet poster
 
Posts: 94
Default Attachment not display when add to mail

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
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
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


All times are GMT +1. The time now is 08:56 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.Search Engine Friendly URLs by vBSEO 2.4.0
Copyright ©2004-2025 Outlook Banter.
The comments are property of their posters.