Hi,
I'm trying to use vba to export a file to pdf. I've been successful, until i ran into this problem. See, I use this macro to create a .xlsx file, it gathers copies of tabs from many different files and select them and save it as .pdf . The saving part is like
ActiveSheet.ExportAsFixedFormat Type:=xlTypePDF, Filename:="\\serv-arq\Previdencia_2012\publico_leitura\...\filename.pdf", _
Quality:=xlQualityStandard, IncludeDocProperties:=True, _
IgnorePrintAreas:=False, OpenAfterPublish:=True
the folder in file name just the folder of the excel file which contains the macro. my problem is that this filename is too big (over 218 characters), because the path is too big, and i cant fix that !
if, instead, i use just "filename.pdf" it saves in some default folder, like My Documents. So i decided to change default folder, using the macro, to the current path, but that didnt help either. The funny thing is that if i create a macro directly in the generated .xlsx file in order to generate the pdf it works.
Any thoughts ?
Thanks in advance,
Rafael
Bookmarks