Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello,
I use the below macro to export chart data to qvd and I need to include a date/timestamp so I do not overwrite the prior export.
SUB SaveBudgetQVDLocal
set obj = ActiveDocument.GetSheetObject("CH5026")
obj.ExportEx "C:\Users\nicholasm\Desktop\NEW_BUDGET_BUILD_2015_v4\new_budget_R12_analysis_build_2015\Exec_R12_Frcst_Reporting_v3.qvd", 4
END SUB
Any info on how to insert 0 for null values in an inputfield specific to a column in a table box via a macro would be greatly appreciated. I have tried many variations... no luck.
Thx and have a great day - Nick M.
Try it with a date, maybe with changed or additional formating from them or a timestamp:
SUB SaveBudgetQVDLocal
set obj = ActiveDocument.GetSheetObject("CH5026")
path = "C:\Users\nicholasm\Desktop\NEW_BUDGET_BUILD_2015_v4\new_budget_R12_analysis_build_2015\"
filebase = "Exec_R12_Frcst_Reporting_"
filedate = year(date) & "_" & month(date) & "_" & day(date)
fileext = ".qvd"
exportTyp = 4
obj.ExportEx path & filebase & filedate & fileext, exportTyp
END SUB
A counter would be need more efforts. Either saving the counter separatly or reading and checking the folder for each file.
- Marcus
Try it with a date, maybe with changed or additional formating from them or a timestamp:
SUB SaveBudgetQVDLocal
set obj = ActiveDocument.GetSheetObject("CH5026")
path = "C:\Users\nicholasm\Desktop\NEW_BUDGET_BUILD_2015_v4\new_budget_R12_analysis_build_2015\"
filebase = "Exec_R12_Frcst_Reporting_"
filedate = year(date) & "_" & month(date) & "_" & day(date)
fileext = ".qvd"
exportTyp = 4
obj.ExportEx path & filebase & filedate & fileext, exportTyp
END SUB
A counter would be need more efforts. Either saving the counter separatly or reading and checking the folder for each file.
- Marcus
Marcus,
Thanks for the input I will give it a try.
Thx - Nick
Marcus the code you provided exported the file with today's date, how would I add the timestamp?
Thx - Nick
Instead of date you could use time or now() and extend the file-name variable to hour(), minute() and/or second() - you could also try to use now () directly as file-name part, the return-format depend from the system-settings and will give me the string with a bad order-feature and invalid path-chars. But in your case it might be other, try it at first.
- Marcus