Macro to create PDF's question

  • Thread starter Thread starter joeyarsenault19
  • Start date Start date
J

joeyarsenault19

Hi. I have macro that does the following:

1) Opens a spreadsheet with 6 tabs (worksheets)
2) Selects one tab, and prints using the Acrobat Disiller as a printer
3) Saves this file as "cashseries.pdf"
4) Goes back to the spreadsheet and selects the next tab
5) Repeats the .pdf creation, saving the next tab as "primeseries.pdf"
6) and so forth for all six tabs, saving as a different name

In the end, I will have 6 .pdf files created all with different names

The only problem I am having is, when these files get created, they ar
all saved in "My Documents" folder. I'm trying to save them in a certai
folder.

Part of the macro code is as follows:

-*Sheets("Prime Series").Select
ActiveWindow.SelectedSheets.PrintOut Copies:=1, printToFile:=True
_
prtofilename:="L:\rates\primeseries"
Kill "L:\rates\primeseries"*-

Can someone tell me what I am doing wrong?

Thanks
 
I suspect that you might need to use the ChDrive statement to change the
default drive before you try to save the files

ChDrive L
 

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

Back
Top