Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

help with macro recorder 1

Status
Not open for further replies.

JTBorton

Technical User
Jun 9, 2008
345
DE
I want to open a blank email template that the user can use to send mail and attachments. I keep trying to use the macro recorder to get the code, but it wont record anything when I select from the sendto:, put in an address and then send a mail. It works fine for other things, how do I get it to record these actions?
 
A starting point:
Code:
CreateObject("WScript.Shell").Run "mailto:"

Hope This Helps, PH.
FAQ219-2884
FAQ181-2886
 
so is that VBscript?

okay so how can I fill in the recipients and subject with that?

Code:
Set object = CreateObject("WScript.Shell")
object.Run "mailto:"
With object
    .To = "FName.LName@company.com"
    .Subject = "My Subject"
End With

man now I'm REALLY intrigued
 
object.Run "mailto:FName.LName@company.com?subject=My%20Subject"

Hope This Helps, PH.
FAQ219-2884
FAQ181-2886
 
Awesome thanks. Now bare with more just a little bit more. I tried to add a Cc address.

<FirstAddress> and <SecondAddress> have been substituted in the place of email addresses

This is what I used:
object.Run "mailto:<FirstAddress>?cc=<SecondAddress>?subject=My%20Subject"

This is the result:
To: <FirstAddress>
Cc: <SecondAddress>?subject=My
Subject: (blank)

What did I do wrong? Also, how do you attach files?

-JTBorton
Another Day, Another Disaster
 
object.Run "mailto:<FirstAddress>?cc=<SecondAddress>[!]&[/!]subject=My%20Subject"

Hope This Helps, PH.
FAQ219-2884
FAQ181-2886
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top