G
gilbert_jeffd
Hi,
I have a created a simple VBS script that I call from a SQR program in
PeopleSoft. The script executes the Visio OrgChart Wizard and after it
is done building the orgchart, it saves the chart to a unique file name
(userid concatinated with datetime). Another PeopleSoft process then
picks up the file and emails it to the user.
This all works fine.
Now I have been asked to automate the the saving of the orgchart to
PDF.
I recorded a macro from within Visio that gave me the following code:
Application.ActiveDocument.PrintOut PrintRange:=visPrintAll, _
PrinterName:="Adobe PDF"
I have tried to incorporate this code into my script without success.
Here is what I have:
bunch of wizard stuff OutPutFile=FileName
oVisio.ActiveDocument.SaveAs(OutputFile)
oVisio.ActiveDocument.PrintOut 'PrintRange:=visPrintAll,PrinterName
PrinterName:="Adobe PDF"'
oVisio.ActiveDocument.close
oVisio.quit
Set oVisio = nothing
The error I get is: Wrong number of arguements or invalid property
assignment
Visio 2003, Windows 2000 Pro
Very knew to visio and VB so any help would be greatly appreciated.
TIA,
Jeff
I have a created a simple VBS script that I call from a SQR program in
PeopleSoft. The script executes the Visio OrgChart Wizard and after it
is done building the orgchart, it saves the chart to a unique file name
(userid concatinated with datetime). Another PeopleSoft process then
picks up the file and emails it to the user.
This all works fine.
Now I have been asked to automate the the saving of the orgchart to
PDF.
I recorded a macro from within Visio that gave me the following code:
Application.ActiveDocument.PrintOut PrintRange:=visPrintAll, _
PrinterName:="Adobe PDF"
I have tried to incorporate this code into my script without success.
Here is what I have:
bunch of wizard stuff OutPutFile=FileName
oVisio.ActiveDocument.SaveAs(OutputFile)
oVisio.ActiveDocument.PrintOut 'PrintRange:=visPrintAll,PrinterName
PrinterName:="Adobe PDF"'
oVisio.ActiveDocument.close
oVisio.quit
Set oVisio = nothing
The error I get is: Wrong number of arguements or invalid property
assignment
Visio 2003, Windows 2000 Pro
Very knew to visio and VB so any help would be greatly appreciated.
TIA,
Jeff