email macro read receipt

P

Pam M

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
 
S

SeanC UK

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.
 
P

Pam M

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 said:
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 said:
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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top