Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Org Chart Wizard - Ordering incorrect

Status
Not open for further replies.

kken

Programmer
Jun 5, 2001
51
CA
Hi all:
I read in a csv file and create a visio doc using the Org chart wizzard. It works perfectly except for the ordering. It seems to order randomly instead of the order in the file.

'START THE ORG CHART WIZ
objVisio = CreateObject("Visio.Application")
objAddOn = objVisio.Addons.ItemU("OrgCWiz")
objAddOn.Run("/S-INIT")

'Run through array to setup args for the org chart
For Index = 0 To arrArgs.GetUpperBound(0)
If Index = 0 Then
objAddOn.Run("/S-ARGSTR " + strCommandPart)
strCommandPart = " /FILENAME=" & strFile
objAddOn.Run("/S-ARGSTR " + strCommandPart)
End If
If arrArgs(Index) <> "" Then
strCommandPart = "/" & arrArgs(Index)
objAddOn.Run("/S-ARGSTR " + strCommandPart)
End If
Next
'Run the wizzard
objAddOn.Run("/S-RUN")

objVisio.ActiveDocument.SaveAsEx(strNewFile, 2 + 4)
objVisio.Quit()
objVisio = Nothing
GC.Collect()

Any help would be appriciated
Thanks
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top