Gemme automatisk som PDF med en markro
Kan jeg på nogen måde få det strikket sammen sådan jeg ved udførelse af min markro kan få både en txt fil og en PDF fil i samme hug.Min markro ser sådan ud nu:
http://s000.tinyupload.com/index.php?file_id=48385399021621928921
Sub RunMacro()
Dim cMacro$
Dim cMacro2$
' Find the QuoteMacro.xls workbook and execute the real macro.
cMacro = "'" + ActiveWorkbook.Path + "\" + "quotemacro.xls'!RcwQuote"
cMacro2 = "'" + ActiveWorkbook.Path + "\" + "quotemacro.xls'!Prissetting"
Application.Run cMacro
Application.Run cMacro2
Workbooks("QuoteMacro.xls").Close
ExportAsText ("C:\Multi900\" & Range("JOBNO") & ".txt")
End Sub
Private Sub ExportAsText(Path)
Application.DisplayAlerts = False
ActiveWorkbook.SaveAs Filename:=Path, FileFormat:=xlText, CreateBackup:=False
Application.DisplayAlerts = False
End Sub
Private Sub Workbook_Open()
Call RunMacro
End Sub
inden i markroen :
ExportAsText ("C:\Multi900\" & Range("JOBNO") & ".txt") gemmer i mappen C:\Multi900