Quantcast
Channel: Active questions tagged email - Stack Overflow
Viewing all articles
Browse latest Browse all 29934

How to hide Macro Button in sent email

$
0
0

I am currently working on a excel workbook that utilizes a macro button that executes several operations. In which one operation is that the user selects an email that the excel workbook will then be sent to. In which, I'm struggling to figure out how to hide the macro button once the recipient opens the workbook. It only hides the macro button on my end, which I can't have either. How can I get this to where whoever the person receiving the email wont see the button?

This excel workbook is a template. So it will be used continuously so the user will still need to access the macro button when they are starting a new excel template.

This is my code that I current have. Essentially if the user has made sure they are ready to email the template, the code will execute like this:

With outlookEmailApp 'function that sends the email

myMail.To = emailRecipients ' calls to emailRecipients variable (What the user enters)
myMail.CC = ccRecipients ' calls to ccRecipients variable (what the user may or may not enter)
myMail.Subject = subjectLine ' calls to subjectLine variable (what the user enters)
myMail.Body = bodyContent ' attaches body content message to email
ActiveSheet.Shapes("Button 1").Visible = False=

myMail.Attachments.Add ActiveWorkbook.FullName ' attaches this current workbook to the email
myMail.Send ' function sends email to recipient
End With

Any help will be appreciated!


Viewing all articles
Browse latest Browse all 29934

Latest Images

Trending Articles



Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>