Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
The code below in the OnPostReload Trigger for Run Macro give me an error
Cannot open filename111009.csv for writing!
Does anyone know what I am doing is wrong?
sub exportList
set obj = ActiveDocument.GetSheetObject("TB01")
File = "'filename' & timestamp(now(), 'MMDDYY') & '.csv'")
obj.Export File, ";"
'obj.ServerSideExport File, ";"
end sub
I have set the Mofule Security & Local Security to Allow System Access. I am on a 64bit QV and will be pushing it to the server to make it auto export onpostreload. Thanks in advance for your help.
You should provide comlete path. It seems, it's trying to save in some windows folders, which is not allowed, especially in Vista environment. Itried following and it works fine:
sub exp
set obj = ActiveDocument.GetSheetObject("TB01")
File = "C:\Temp\filename" & DatePart("M", timeStamp) & DatePart("D", timeStamp) & DatePart("YYYY", Date) & ".csv"
obj.Export File, ";"
end sub