Automatically outputing PowerPoint by coding in hyperview
hi,guys!In hyperview, I am trying to automatically report in the form of PPT by coding. My codes is as follows:
proc ::AutoCreateReport::AutoCreatePPT {pptpath} {
set templatepath $pptpath;
hwi OpenStack
hwi GetSessionHandle sessionH
sessionH GetPublishingHandle pub
pub GetPPTPublishHandle ppt
ppt SetSyncAtPublish false
ppt SetSyncHgNotes false
ppt SetDestination 'disk'
ppt SetPathOnDisk $templatepath
ppt Publish
ppt ReleaseHandle
pub ReleaseHandle
sessionH ReleaseHandle
hwi CloseStack
}
But there is always the error that is as follows:
::hw::publish::ppt::GUI::PublishCB
1
while executing
'# Compiled -- no source code available
error 'called a copy of a compiled script''
It is so appreciate to you for helping me solve it.
Answers
-
Hello,
Were you able to solve this ? Please let me know.
1 -
I was able to publish the session to ppt, when I removed hwi CloseStack from my script.
1 -
Hi Zaily,
You can try out the new Report functionality in HyperWorks. The advantage of this tool is that it will create the report the same way irrespective of your OS and office/ google doc application and its version.
I have attached a couple scripts. The one that says "classic" in the name can be used in the HyperWorks versions 2021 and onwards in the old user interface.
If you're running the script manually and not in batch, I recommend the "Next Generation" script, which is applicable to the next generation user interface only. This code very simple.
1 -
Sai91 said:
I was able to publish the session to ppt, when I removed hwi CloseStack from my script.
Even if I keep this command, I still publish the session to ppt. If I only output a session to PPT, I can succeed almost every time. But when I code some commands to loop output some session to ppt, there are always errors.
0