VBA Org chart wizard with 30 pages failing

Started by calgirl, August 23, 2011, 07:40:59 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

calgirl

Hi All

I'm hoping someone can steer me in the right direction.  I am construcsting all the arguments for the OrgCWiz addon but I have over thirty pages and I can't get past 10 to be created and I think it must be a limitation on the string length.

The outcome is only pages upto Colin get generated?  Any ideas??
sPages = " ""David Windridge"" 2 PAGENAME=""CEO Executive Team"", " & _
" ""David AAA"" 3 PAGENAME=""Office of CEO""  " & _
" ""Jo BBB"" 2 PAGENAME=Reception, " & _
" ""John CCC"" 0 PAGENAME=WPA, " & _
" ""Tracey DD"" 0 PAGENAME=""Human Resources"", " & _
" ""Linda EE"" 0 PAGENAME=Marketing, " & _
" ""Peter FF"" 0 PAGENAME=""Information Technology"", " & _
" ""Matthew GG"" 0 PAGENAME=Finance, " & _
" ""Colin HH"" 3 PAGENAME=""Group Training"" , " & _
" ""Michael II"" 0 PAGENAME=""Group Training Operations"" , " & _
" ""Renee JJ"" 0 PAGENAME=""Group Training Payroll"" , "
Set objAddOn = objVisio.Addons.ItemU("OrgCWiz")
'Run the add-on (errors are handled by the add-on)
On Error Resume Next

strCommand = "/FILENAME=""" & sFile & """"
strCommand = strCommand & " /NAME-FIELD=Name " _
& " /UNIQUEID-FIELD=Name " _
& " /MANAGER-FIELD=Manager" _
& " /UNIQUEID-FIELD=Name " _
& " /MANAGER-FIELD=Manager" _
& " /DISPLAY-FIELDS=Name,Title, MatLeave " _
& " /CUSTOM-PROPERTY-FIELDS=Name,Title " _
& " /SYNC-ACROSS-PAGES " _
& " /HYPERLINK-ACROSS-PAGES " _
& " /SHAPE-FIELD=MASTER_SHAPE "

Dim args(1) As String
args(0) = " /PAGES=" & sPages
args(1) = " /PAGES=" & sPagesAAC

objAddOn.Run ("/S-ARGSTR " + strCommand)
For i = 0 To UBound(args)
    objAddOn.Run ("/S-ARGSTR " + args(i))
    i = i + 1
Next
objAddOn.Run ("/S-RUN ")