Hey all,
I am trying to write som VB Script that opens a template document then Imports a PNG to a specific X and Y on the artboard.
I was able to accomplish it in VBA but I am using an RPA tool WinAutomation that can run VB Script and I am not sure how to recreate it in VB. Below is the code I have already.
I can get it to open Corel with the template file, but I am stuck on importing the PNG to the active layer. Any help would be appreciated.
'VB Variables
dim cd
dim doc
dim pg
'Create Corel Instanace / Open Template Document
set cd = CreateObject("CorelDraw.Application")
cd.Visible = True cd.OpenDocument("%Template%")
set doc = cd.activedocument
set pg = cd.activepage
Instead of try to recreate the Script in VBScript, I would suggest you just call your VBA version that is working.
cd.GMSManager.RunMacro("GlobalMacros", "MyModule.MyMacro")
Happy coding,
-Shelby