Hello everybody!
I am having trouble saving my quotations to to xlsm and pdf at the same time. I've figured out how to save to xlsx & pdf, but I can't figure out the code on myself.
I use this code to save to xlsx & pdf:
Sub SaveInvoiceBothWays()
Dim NewFN As Variant
' Create the PDF First
NewFN = "D:\GM PRO d.o.o\Dokumenti" & Range("A15").Value & " " & Range("D15").Value & Range("E15").Value & Range("F15").Value & " " & Range("A9").Value & ".pdf"
ActiveSheet.ExportAsFixedFormat Type:=xlTypePDF, Filename:=NewFN, _
Quality:=xlQualityStandard, IncludeDocProperties:=True, _
IgnorePrintAreas:=False, OpenAfterPublish:=False
' Next, Save the Excel File
Sheets.Copy
NewFN = "D:\GM PRO d.o.o\Dokumenti" & Range("A15").Value & " " & Range("D15").Value & Range("E15").Value & Range("F15").Value & " " & Range("A9").Value & ".xlsx"
ActiveWorkbook.SaveAs NewFN, FileFormat:=xlOpenXMLWorkbook
ActiveWorkbook.Close
End Sub
I want to get this working so I can convert my quotations to Invoices..
Any help will be greatly appreciated.
All the best, Gabl136
I am having trouble saving my quotations to to xlsm and pdf at the same time. I've figured out how to save to xlsx & pdf, but I can't figure out the code on myself.
I use this code to save to xlsx & pdf:
Sub SaveInvoiceBothWays()
Dim NewFN As Variant
' Create the PDF First
NewFN = "D:\GM PRO d.o.o\Dokumenti" & Range("A15").Value & " " & Range("D15").Value & Range("E15").Value & Range("F15").Value & " " & Range("A9").Value & ".pdf"
ActiveSheet.ExportAsFixedFormat Type:=xlTypePDF, Filename:=NewFN, _
Quality:=xlQualityStandard, IncludeDocProperties:=True, _
IgnorePrintAreas:=False, OpenAfterPublish:=False
' Next, Save the Excel File
Sheets.Copy
NewFN = "D:\GM PRO d.o.o\Dokumenti" & Range("A15").Value & " " & Range("D15").Value & Range("E15").Value & Range("F15").Value & " " & Range("A9").Value & ".xlsx"
ActiveWorkbook.SaveAs NewFN, FileFormat:=xlOpenXMLWorkbook
ActiveWorkbook.Close
End Sub
I want to get this working so I can convert my quotations to Invoices..
Any help will be greatly appreciated.
All the best, Gabl136