ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   email macro read receipt (https://www.excelbanter.com/excel-programming/400042-email-macro-read-receipt.html)

Pam M

email macro read receipt
 
I have created the following macro to email my file with the subject
prefilled with text combined with the filename:

Application.Dialogs(xlDialogSendMail).Show _
arg2:="MIX REQUEST: " & [JobName] & ".xls"

I used the arguments from the built in dialogue arguments in Visual Basic of
which there are three--To, Subject, and Read Receipt. I want to set the read
receipt to yes and am having problems getting that to work. I tried
arg3:=true, but get a compile error. Can you help? Thanks, Pam

SeanC UK[_3_]

email macro read receipt
 
Hi Pam,

I have tried this using your code in both the following ways and it appears
to be working OK (Excel 2003):

Dim boolOK As Boolean
boolOK = Application.Dialogs(xlDialogSendMail).Show(arg2:= _
"MIX REQUEST: filename.xls", arg3:=True)
MsgBox (boolOK)
Application.Dialogs(xlDialogSendMail).Show arg2:= _
"MIX REQUEST: filename.xls", arg3:=True

These 2 ways are basically the same, but I was seeing if I could generate
your error. Is there any other error information?

Is it possible to try the Workbooks().SendMail method? The recipient
addresses will need to be know as the code runs for this.

Sean.


--
(please remember to click yes if replies you receive are helpful to you)


"Pam M" wrote:

I have created the following macro to email my file with the subject
prefilled with text combined with the filename:

Application.Dialogs(xlDialogSendMail).Show _
arg2:="MIX REQUEST: " & [JobName] & ".xls"

I used the arguments from the built in dialogue arguments in Visual Basic of
which there are three--To, Subject, and Read Receipt. I want to set the read
receipt to yes and am having problems getting that to work. I tried
arg3:=true, but get a compile error. Can you help? Thanks, Pam


Pam M

email macro read receipt
 
Sean--thank you for your help. Believe it or not, my error was due to me
dropping a line to add my 3rd argument and not separating with a comma. I
just put it at the end of the arg2 line and used a comma separation and it
worked great! Thanks so much for your help. Pam

"SeanC UK" wrote:

Hi Pam,

I have tried this using your code in both the following ways and it appears
to be working OK (Excel 2003):

Dim boolOK As Boolean
boolOK = Application.Dialogs(xlDialogSendMail).Show(arg2:= _
"MIX REQUEST: filename.xls", arg3:=True)
MsgBox (boolOK)
Application.Dialogs(xlDialogSendMail).Show arg2:= _
"MIX REQUEST: filename.xls", arg3:=True

These 2 ways are basically the same, but I was seeing if I could generate
your error. Is there any other error information?

Is it possible to try the Workbooks().SendMail method? The recipient
addresses will need to be know as the code runs for this.

Sean.


--
(please remember to click yes if replies you receive are helpful to you)


"Pam M" wrote:

I have created the following macro to email my file with the subject
prefilled with text combined with the filename:

Application.Dialogs(xlDialogSendMail).Show _
arg2:="MIX REQUEST: " & [JobName] & ".xls"

I used the arguments from the built in dialogue arguments in Visual Basic of
which there are three--To, Subject, and Read Receipt. I want to set the read
receipt to yes and am having problems getting that to work. I tried
arg3:=true, but get a compile error. Can you help? Thanks, Pam



All times are GMT +1. The time now is 01:24 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com