when trying to save an excel sheet as a PDF and naming it , the macro is returning a runtime error 1004 Document not saved .... the code is as follows
ActiveSheet.ExportAsFixedFormat Type:=xlTypePDF, Filename:=_
strPdfFinalPath2, Quality:=_
xlQualityStandard, IncludeDocProperties:= True, IgnorePrintAreas:=False, _
OpenAfterPublish:= False
strPdfFinalPath2 is a Dim named String which works fine, it even recognizes it here. it will just not save. If I manually type in the same information that is brought in by strPdfFinalPath2 it works fine. ????? I need it to be a named , changable Filename
as it archives(saves) this daily and uses that date as part of the name.
I have tried numerous variations of creating the Filename but all bring back the same error, even though the correct path is shown when hovering over strPdfFinalPath2 (
\\CHOFS02\Groups\CVO_Utilities\Relief Logs\Archive\PDF\06-06-2014.pdf) we as a group do not have standard Drives. that is my G: Drive has a different path (CHOFS02\Groups) as someone else (CXOFS01) for example. Any sugesstions
would be appreciated