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
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