Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I have macro code set up to take data from a large workbook, and generate
separate xls files for each employee's data. It currently saves it as an xls file. However, is there a code I can add that will also save it as a pdf file in the same folder? I would like to give the employees the choice to view either .xls or .pdf. |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I use this -- maybe you can adapt it to your needs:
Private Sub CommandButton1_Click() Dim Progname As String Dim MyFile As String Progname = "C:\Program Files\Adobe\Acrobat 7.0\Reader\AcroRd32.exe" MyFile = "C:\Documents and Settings\Jim May\My Documents\test.pdf" Shell Progname & " " & MyFile, vbNormalFocus End Sub "richzip" wrote: I have macro code set up to take data from a large workbook, and generate separate xls files for each employee's data. It currently saves it as an xls file. However, is there a code I can add that will also save it as a pdf file in the same folder? I would like to give the employees the choice to view either .xls or .pdf. |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
On Apr 6, 7:05*am, Jim May wrote:
I use this -- maybe you can adapt it to your needs: Private Sub CommandButton1_Click() Dim Progname As String Dim MyFile As String Progname = "C:\Program Files\Adobe\Acrobat 7.0\Reader\AcroRd32.exe" MyFile = "C:\Documents and Settings\Jim May\My Documents\test.pdf" Shell Progname & " " & MyFile, vbNormalFocus End Sub "richzip" wrote: I have macro code set up to take data from a large workbook, and generate separate xls files for each employee's data. *It currently saves it as an xls file. *However, is there a code I can add that will also save it as a pdf file in the same folder? *I would like to give the employees the choice to view either .xls or .pdf.- Hide quoted text - - Show quoted text - Hi, Jim's code should OPEN an existing PDF file, but it won't save a workbook as a PDF which I believe is what you are after. There is nothing built into Excel that will do this, unless you have version 2007, in which case you can download this: http://www.microsoft.com/downloads/d...displaylang=en Otherwise, have a look around on the net and you should find some other solutions using third party addins. Cheers, Ivan. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Save, save as, page setup dimmed out in unprotected excel sheet? | Excel Discussion (Misc queries) | |||
Command Button Save As Application.ExecuteExcel4Macro ("SAVE.AS?() | Excel Discussion (Misc queries) | |||
Disable save, save as, but allow save via command button | Excel Programming | |||
How to diasble save and save as menu but allow a save button | Excel Programming | |||
Totally Disabling (^ save ) (Save as) and Save Icon – Which code do I use: | Excel Programming |