Send Email choice

wmtsub

Active Member
Joined
Jun 20, 2018
Messages
322
I am using a macro to send emails. But sometimes I want to see the results first.
I can manually reset the options to do so here by changing the remark.
[FONT=Verdana,Arial,Tahoma,Calibri,Geneva,sans-serif]' .send '<-- Send out this email
.display'<--
Display instead for the debugging only

How can I get a prompt like this one to reset those for me?
[/FONT]
[FONT=Verdana,Arial,Tahoma,Calibri,Geneva,sans-serif]If MsgBox("Send Email?", vbYesNo + vbQuestion, "Email") = vbYes Then em = "Y"[/FONT]
 
Upvote 0

Excel Facts

How to calculate loan payments in Excel?
Use the PMT function: =PMT(5%/12,60,-25000) is for a $25,000 loan, 5% annual interest, 60 month loan.
Thank ypou. Read thru those post and i think I am beyond that. My email macro works fine. Its just that sometimes I have a need to display them first rather than send them directly. And i can re-right the code to do so. Was just wanting to do that programmatically instead.
 
Upvote 0
Thank ypou. Read thru those post and i think I am beyond that. My email macro works fine. Its just that sometimes I have a need to display them first rather than send them directly. And i can re-right the code to do so. Was just wanting to do that programmatically instead.

But you have to put the variable before the cycle.
I do not understand how you have your cycle, first because you did not put all your code and second because you are using a GoTo.
Maybe you need a global variable.
It's very simple but I must see all your code and put the necessary instructions.
 
Upvote 0
I appreciate your support - I really do. but i am reluctant to post all my code becuase there is sensitve data in it.

I was trying to follow this approach but get an error stating "Property is read only? How can I get around that?

Code:
[FONT=Verdana,Arial,Tahoma,Calibri,Geneva,sans-serif][LEFT][COLOR=#222222][FONT=Verdana]' Set Output
    If MsgBox("Send Email?", vbYesNo + vbQuestion, "Email") = vbYes Then
    snd = ".send"
    dsply = ".Display"
    Else
    snd = ".send"
    dsply = ".Display"
End If


[FONT=Verdana,Arial,Tahoma,Calibri,Geneva,sans-serif]'Specify email recipients, subject, etc:
    .To = ema
     Const Behalf = "wm" ' <-- Name to send on behalf of Exchange profile/account
    '.Cc = "carboncopy@..."
    .Bcc = bccl
    .Subject = inltr & tdd & " -- For --  " & vnd
    .SentOnBehalfOfName = Behalf
    .send = snd
    .display = dsply
      
        End With[/FONT][B][I][U][SUB][SUP]<strike>
</strike>[/SUP][/SUB][/U][/I][/B][/FONT][/COLOR][/LEFT][/FONT]
 
Upvote 0
I appreciate your support - I really do. but i am reluctant to post all my code becuase there is sensitve data in it.

I was trying to follow this approach but get an error stating "Property is read only? How can I get around that?


I understand the sensitive data. You can change them by general data.
If I do not see all the code I can not help, sorry.

The only thing I can do is tell you examples, but you must adapt it, but if you have problems, I can not keep guessing how you have the code.
 
Upvote 0

Forum statistics

Threads
1,223,704
Messages
6,173,984
Members
452,540
Latest member
haasro02

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