Open An Outlook Attachment From A Display MailItem

kashif.special2005

Active Member
Joined
Oct 26, 2009
Messages
443
Hi Excel Experts,

I hope you are doing good and staying safe and healthy, I am facing a very strange error in outlook attachment and I need your expert help/advice on this.

I have an Excel template with ".xlsm" extension, and through excel vba code I am attaching this file in an outlook mail item and then calling the method ".Display" to display the mail and then user put some mail address and then manually send the mail, and when the end user received this mail and when the end user try to open the attached excel file from the mail there is an error message showing that "file is corrupted" something like that and the attach file is not opening.

Now the strange part here is that when I attach the file in the mailitem through code and then calling the method ".Display" to show the mail, now the trick is that when the user manually open the attached ".xlsm" file through double click on the file and then close the file without doing anything and then put the email address in the mailitem and then send the mail, and then now when the end user who received the mail try to open the attached ".xlsm" file and this time the file opens without any error.

So the trick part here is that open the attached file directly from the display mailitem before sending the mail.

My Requirement:

I want to find a method or code through that after attaching the file in the mailitem can open the file directly from the display mailitem and then close the file without doing anything, through the code, and then user can manually put the mail address and then send the mail.

Is it possible to open an attachment file directly from a display mailitem without saving the attach file? mean I want to open the attach file directly form the display mail item, like we open the attached file through double click on the file.

Thanks & Regards
Kashif
 

Excel Facts

How to find 2nd largest value in a column?
MAX finds the largest value. =LARGE(A:A,2) will find the second largest. =SMALL(A:A,3) will find the third smallest

Forum statistics

Threads
1,215,734
Messages
6,126,543
Members
449,316
Latest member
sravya

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top