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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Specify email address on button click 1

Status
Not open for further replies.

jpkeller55

Technical User
Apr 11, 2003
131
US
I have the following very simple code on a button in Excel for a user to click on to Email the excel (2003) file in Outlook. This works fine. I would like to have Outlook open with the file attached as it does now but with a specific email address populated in the TO: field of Outlook (2003). Is this possible?
Code:
 Application.Dialogs(xlDialogSendMail).Show
 
You're able to use the arguements for that method, e.g.
Code:
Application.Dialogs(xlDialogSendMail).Show arg1:="Harley@uinn.com"
Hope this helps

HarleyQuinn
---------------------------------
The most overlooked advantage to owning a computer is that if they foul up there's no law against wacking them around a little. - Joe Martin

Get the most out of Tek-Tips, read FAQ222-2244 before posting.
 
This is interesting. I can get this code to work on my personal computer but it does not populate anything on my work computer that is hooked up to the company network. Is the fact that this is on a VPN network have anything to do with it not working?
 
Shouldn't as far as I know.

HarleyQuinn
---------------------------------
The most overlooked advantage to owning a computer is that if they foul up there's no law against wacking them around a little. - Joe Martin

Get the most out of Tek-Tips, read FAQ222-2244 before posting.
 
Is the another method to accomplish this besides the code above?
 
Not sure why this worked, but I deleted the old macro code and started over. Now it works. Thanks Harely.

JK
 
You're welcome, glad I could help [smile]

HarleyQuinn
---------------------------------
The most overlooked advantage to owning a computer is that if they foul up there's no law against wacking them around a little. - Joe Martin

Get the most out of Tek-Tips, read FAQ222-2244 before posting.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top