excel macro to delete file attachment from email after it was installed

Alwinaz

Board Regular
Joined
Feb 7, 2012
Messages
201
Hi there

Is there a way to destroy an excel file if it was send as an email attachment. I have a file Funmathicx.xlsm which i am sending via email. When the user open the file they will only see the instruction page and the rest of the worksheets are hidden. there is an install button on the sheet which creates a folder Funmathics under my documents and then save the file in that folder. Once it is saved i want a macro which will destroy (delete the file attachment) so that it can not be forwarded to other people. Is it possible to do something like this?
 

Excel Facts

Create a chart in one keystroke
Select the data and press Alt+F1 to insert a default chart. You can change the default chart to any chart type
If you Google for 'remove email attachment vba' you will get lots of hits. You can use the Attachment's Delete or Remove method.
 
Upvote 0
Most of the post that i saw, gives vba that you put in you outlook. I am looking for vba to put in my excel file and not outlook.
 
Upvote 0
You can automate Outlook from Excel but I don't know how you would find the Email that contained the attachment.
 
Upvote 0
So is it then not possible to write a macro/vba in excel to destroy/delete file content after running the install macro?
 
Upvote 0

Forum statistics

Threads
1,218,899
Messages
6,145,093
Members
450,590
Latest member
Naneng

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