Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi Team,
We have a requirement auto export the chart into excel,text,qvd in a particular path.So we given macro condition in Post refresh option found in Document Setting trigger.The macro which i am using is working in local desktop whereas it is not working in UAT server.
Below i attached the macro which i was used.
Macro 1 used to export the chart into txt:
sub ExportExcel
Dim DateTimeNow, DateTimeFormatted
DateTimeNow = Now()
DateTimeFormatted = DatePart("YYYY",DateTimeNow) &"_"& right("0" & "_"& DatePart("M",DateTimeNow),2) & "_"& right("0" & DatePart("D",DateTimeNow),2)
SET varVersion = ActiveDocument.Variables("vExportVersion")
SET varEntity = ActiveDocument.Variables("vEntity")
output= "Our Share path"
vFilename= varEntity.GetContent.String &"_"& DateTimeFormatted &"_"& "V" & right("0"&varVersion.GetContent.String,2) & ".txt"
set obj = ActiveDocument.GetSheetObject("CH01")
obj.Export (output& vFilename) , "|"
end sub
Macro 2: used to export chart into QVD
sub Exportqvd
Dim DateTimeNow, DateTimeFormatted
DateTimeNow = Now()
DateTimeFormatted = DatePart("YYYY",DateTimeNow) &"_"& right("0" & "_"& DatePart("M",DateTimeNow),2) & "_"& right("0" & DatePart("D",DateTimeNow),2)
SET v = ActiveDocument.Variables("vPath")
SET varVersion = ActiveDocument.Variables("vExportVersion")
SET varEntity = ActiveDocument.Variables("vEntity")
set obj = ActiveDocument.GetSheetObject("CH01")
vPathName= v.GetContent.String&"\"&varEntity.GetContent.String &"_"& DateTimeFormatted &"_"& "V" & right("0"&varVersion.GetContent.String,2) & ".qvd"
obj.ExportEx vPathName,4
end sub
Note:
1. We enabled " Give system access to Module Script" in Change Module Security.
2. Click on Button to export the macro is working in Server (our Condition Auto Export)
None of the above are not working in server but working in local.
Please help me to get resolve from here.