Macro: Save Excel in Pdf and Mail

arep

New Member
Joined
Oct 1, 2009
Messages
9
Hello

I have excel 2007 and I want to create macro to:
1. save active worksheet into the specific folder which is named in the cell R5,
2. name the active worksheet with names in cells R6 and S6,
3. e-mail the active worksheet as pdf to the adresses which are in the cells R7-R20 (may be to name range as "addresses"),
4. open the specific web page,
5. close excel

I found smth. put I can't create an e-mail. Any ideas how to accomplish the macro:

Thank You

Are

Sub MakePDFSaveAndMail()
ActiveSheet.ExportAsFixedFormat Type:=xlTypePDF, Filename:= _
ActiveSheet.Range("R5").Value & ActiveSheet.Range("R6").Value & ActiveSheet.Range("S6").Value, Quality:= _
xlQualityStandard, IncludeDocProperties:=True, IgnorePrintAreas:=False


ActiveWorkbook.FollowHyperlink Address:=http://www.yahoo.com
ActiveWorkbook.Close SaveChanges:=False
End Sub
 

Excel Facts

Is there a shortcut key for strikethrough?
Ctrl+S is used for Save. Ctrl+5 is used for Strikethrough. Why Ctrl+5? When you use hashmarks to count |||| is 4, strike through to mean 5.

Forum statistics

Threads
1,224,599
Messages
6,179,831
Members
452,946
Latest member
JoseDavid

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