Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Save to pdf and make filename
I'm trying to make the macro to atumaticly give the pdf-file a name and
to save it were I want. Do anyone know howe to do this? I'l be wery grateful. I have strated with this: Sub SaveAsPDF() Dim WO As String Dim Track As String Dim Filename As String Dim str As String Dim strNetworkPrinter As String str = Application.ActivePrinter WO = Worksheets("Blad1").Range("F2") Track = Worksheets("Blad1").Range("F3") strNetworkPrinter = GetFullNetworkPrinterName("Adobe PDF") Filename = "F:\Test\ " & WO & " S-" & "@" & " " & Track & ".PDF" If Len(strNetworkPrinter) 0 Then Application.ActivePrinter = strNetworkPrinter ActiveWindow.SelectedSheets.PrintOut End If Application.ActivePrinter = str End Sub |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Cell("filename") doesn't update to new filename when do save as. | Excel Worksheet Functions | |||
VBA - Save with New Filename | Excel Programming | |||
VBA - Save with new filename | Excel Programming | |||
save as different filename | Excel Programming | |||
Save Filename | Excel Programming |