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

Test for Multiple Conditions in IF?
Use AND(test, test, test, test) or OR(test, test, test, ...) as the logical_test argument of IF.
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,214,521
Messages
6,120,018
Members
448,937
Latest member
BeerMan23

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