Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Sirs,
I try to export the values from at bar chart to an excel file via macro. It works, until i want the date of today to be a part of the filename, eg. "Testprognose_011013.xls"
Searching the forum i have found something like this but cant get it to work.
vToday is defined as date(today(2))
'set obj = ActiveDocument.GetSheetObject("CH289")
'set bb = ActiveDocument.Variables("vToday")
'mydatevar = bb.GetContent.String
'File = "C:\Users\jju\Desktop\testprognose"&[mydatevar]&".xls"
'obj.ExportEx File, ";"
Any insights?
Hi, this should work.
ActiveDocument.RecallDocBookmark "Report1"
ActiveDocument.GetApplication.WaitForIdle
ActiveDocument.Sheets("SH02").Activate
ActiveDocument.GetApplication.WaitForIdle
set obj = ActiveDocument.GetSheetObject("CH02")
ActiveDocument.GetApplication.WaitForIdle
obj.ExportBiff "\\Path\" & "My document name " & Year(Now())& Right("0" & Month(Now),2) & Right("0" & Day(Now),2) & ".xls"
Hi, this should work.
ActiveDocument.RecallDocBookmark "Report1"
ActiveDocument.GetApplication.WaitForIdle
ActiveDocument.Sheets("SH02").Activate
ActiveDocument.GetApplication.WaitForIdle
set obj = ActiveDocument.GetSheetObject("CH02")
ActiveDocument.GetApplication.WaitForIdle
obj.ExportBiff "\\Path\" & "My document name " & Year(Now())& Right("0" & Month(Now),2) & Right("0" & Day(Now),2) & ".xls"
Wonderful, thanks a lot.