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