Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi all, i have a simple VBA file to reload an application.
In this QV i have a macro that export some images. The problem is it won't run the macro right, it's just open the macro window.
So my question is there is possible to run this macro in the VBS fil?
Export images into a location in the computer?
Br
It's really hard to answer this question without seeing the macro code.
Here you go!
function exportImages
' Test if export should be made
set v = ActiveDocument.Variables("RunNow")
if v.GetContent.String = "Yes" then
v.SetContent "No",true
exportAll
ActiveDocument.GetApplication.Quit
end if
end function
function exportAll
export("CH97")
export ("TX09")
end function
function export(chartId)
set obj = ActiveDocument.GetSheetObject(chartId)
obj.ExportBitmapToFile "C:\inetpub\wwwroot\as400\UTL\Chart_" & chartId & ".png"
end function
Hi! if the macro window is opened when you run it it is because there is an error in your code. You can use the "test" button to locate the error and get some info:
On the other hand, yes, what you need can be done. I checked your code and it runs perfectly in my computer. Check objects IDs, check that those objects are visible, check the path where you save the pics and verify that you allow system acces
Regards,
Jaime.
I have testit, and get memory problems and strange errors.. Sometime it works, sometime not.
Can i run a batfile? Like this.
"C:\Program Files\QlikView\Qv.exe" /I /r "C:\Qv\ManifestOrdersBILD.qvw"
If i run above, the qlikview will not reload it 😞
Johnan, I believe the /r and /l are mutually exclusive, one or the other in regard to those, I will try to confirm, but I suspect that is why things are not working for you, if you do one or the other there, I suspect that should get things working.
I am going to submit a doc defect regarding the fact this is not clear in the Help, but I did confer with a coworker and he thought the same thing, so I am pretty sure we are correct here, you have to use the /r or /l...
Regards,
Brett