Macro Print to PDF save to Folder

Daaan

New Member
Joined
Sep 5, 2008
Messages
33
Hi All

I have the following macro that I use to automatically print numerous pages to pdf and save the file as a certain name. This saves it to My Documents.

That works great... however, does anyone know if there is a way where you can save it to a specific drive/folder eg H:\Sensitive Data\File

Sub Print_Non_Spec_PDF()
For r = 4 To 1000
Sheets("13.Special Case Calc").Range("G4").Value = Cells(r, 1).Value
Sheets("13.Special Case Calc").ExportAsFixedFormat Type:=xlTypePDF, Filename:=Sheets("13.Special Case Calc").Range("G4").Value & Sheets("13.Special Case Calc").Range("G5").Value & ".pdf"
Next r
End Sub


Thanks
Dan
 

Excel Facts

Excel Can Read to You
Customize Quick Access Toolbar. From All Commands, add Speak Cells or Speak Cells on Enter to QAT. Select cells. Press Speak Cells.

Forum statistics

Threads
1,224,578
Messages
6,179,654
Members
452,934
Latest member
mm1t1

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