Visio OrgChart wizard

B

bryme

With the OrgChart wizard (orgwiz.exe in Visio 2003), there is a great article
that tell what command line arguments can be used
(http://office.microsoft.com/en-us/assistance/HA010774641033.aspx).
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.
 
B

bryme

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
 
Joined
Nov 13, 2013
Messages
2
Reaction score
0
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?
 
Joined
Nov 13, 2013
Messages
2
Reaction score
0
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"

'START VISIO'S ORG CHART WIZARD
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" & _
" /SHOW-DIVIDER-LINE" & _
" /SYNC-ACROSS-PAGES" & _
" /HYPERLINK-ACROSS-PAGES"

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

Top