Visio OrgChart wizard



With the OrgChart wizard (orgwiz.exe in Visio 2003), there is a great article
that tell what command line arguments can be used
Unfortunately, the pages argument (/PAGES=<top employee> <num levels>
PAGENAME=<pagename>, <top employee> <num levels> PAGENAME=<pagename>...)
doesn't seem to work properly when trying to specify employees or pagenames
that have spaces. I keep getting errors when I attempt to use this with the
wizard thinking that each entry is a separate parameter. Is there something
that I'm missing? I've tried putting the names with and without quotes in
brackets, etc.


yes i did, but the exe sees each word as a separate word even though the
quotes are there. i've tried double quotes and single quotes
Nov 13, 2013
Reaction score
Any luck?

I've run into the same exact problem and have searched the internet for the last several hours looking for a solution with no luck... Any ideas out there?
Nov 13, 2013
Reaction score
Trouble with PAGES parameter of Visio Org Chart Wizard

I posted earlier about the issue I'm having and am including the VBA code here:

Dim visApp As Object
Dim visDoc As Visio.Document
Dim visExcelFile As String
Dim objAddOn As Object
Dim orgWizArgs As String
Dim topLevel As String
Dim topLevel2 As String

'Assign file location of Excel file that feeds into Visio
visExcelFile = "C:\Users\.xlsx"

Set visApp = CreateObject("Visio.Application")
Set objAddOn = visApp.Addons.ItemU("OrgCWiz")
objAddOn.Run ("/S-INIT")

topLevel = Range("A2").Value
Debug.Print topLevel

'Add org chart arguments
orgWizArgs = " /FILENAME=" & visExcelFile & _
" /NAME-FIELD=Direct_Report" & _
" /MANAGER-FIELD=Supervisor" & _
" /PAGES=" & topLevel & _
" /DISPLAY-FIELDS=Direct_Report" & _
" /CUSTOM-PROPERTY-FIELDS=Direct_Report_Job_Title, Division/College, Department, Subordinates, Faculty_to_Faculty" & _

objAddOn.Run ("/S-ARGSTR " + orgWizArgs)

'Run the wizard
objAddOn.Run ("/S-RUN")

Let's say that the contents of range A2 = Doe, John A. I get 3 error messages like the following: Employee name = A is not in your organizational data, Employee name = John is not in your organizational data, and Employee name = Doe is not in your organizational data.

Any thoughts on what I'm doing wrong?
Last edited:

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question