Hi,
I'm trying to export pdf files from from excel. This is in relation to data for various owners of business. The pdf file is current exported with the business name (Filename:=ActiveWorkbook.Path & "\" & ActiveSheet.Range("O7").Value) . Typically each business owner has one location, where the macro works well. However if the business owner has more than location rather than appending to the existing pdf file, the file is overwritten. How would you edit the code to append to a pdf where one currently exists?
As an alternative - I do have an actual printer setup which will print to pdf and a pop up box shows asking for a file name to be given, it also allows for the option to append to pdf. Not sure if this could be used instead of the excel feature to export to pdf instead.
Many Thanks,
i = 4 '4
Do While i < 356
Sheets("Stores").Select
Cells(i, 5).Select
Selection.Copy
Sheets("Appendix E").Select
Range("b7").Select
Selection.PasteSpecial Paste:=xlValues, Operation:=xlNone, SkipBlanks:= _
False, Transpose:=False
'Sheets("Appendix E").Select
ActiveSheet.ExportAsFixedFormat _
Type:=xlTypePDF, _
Filename:=ActiveWorkbook.Path & "\" & ActiveSheet.Range("O7").Value, _
Quality:=xlQualityStandard, _
IncludeDocProperties:=False, _
IgnorePrintAreas:=False, _
OpenAfterPublish:=False
i = i + 1
Loop
End Sub
Display More