Send Error Report dialog on vsd open

B

Bryan Sippel

I'm using Visio 2003 Professional on Windows XP
Professional to import org data from SAP R/3. I created
an org chart template using a macro attached to the
Document_DocumentCreated event to read my SAP data file
and call the Org Chart Wizard to create the org chart.

I discovered that the Org Chart Wizard does not like the
word "Shape" specified in the CUSTOM-PROPERTY-FIELDS
parameter (at least not if it is also specified in the
SHAPE-FIELD parameter). After running the template to
import the data, format the chart and save the file;
reopening the file causes the Microsoft Fatal Error dialog
to appear prompting to Send Error Report to Microsoft.

Removing the "Shape" column name from my CUSTOM-PROPERTY-
FIELDS parameter fixed the problem, but now, I am unable
to show the contents of that column as a custom property
for each shape.

The parameters I was passing to OrgCWiz are:
--------------------------------------------
'Org Chart Wizard commands
strcommand = " /FILENAME=""" & TxtFileName & """" _
& " /NAME-FIELD=""SubName""" _
& " /MANAGER-FIELD=""RptTo""" _
& " /DISPLAY-FIELDS=" _
& """EmpName"",""SubName"",""PosName"",""JobName""" _
& " /SHAPE-FIELD ""Shape""" _
& " /CUSTOM-PROPERTY-FIELDS=""Shape""" _
& " /HYPERLINK-ACROSS-PAGES" _
& " /SYNC-ACROSS-PAGES" _
& " /SHOW-DIVIDER-LINE" _
& " /PAGES=" & PageNames

'Start the Org Chart Wizard and run the "/" commands
Set appvisio = Visio.Application
Set visaddon = appvisio.Addons.Item("OrgCWiz")
visaddon.Run ("/S-INIT")

'append the cmd line parms for the call to the wizard
Dim iMaxArgstringLength As Integer
Dim strCommandPart As String
Dim strCommandLeft As String
iMaxArgstringLength = 100
strCommandLeft = strcommand
While (Len(strCommandLeft) > 0)
strCommandPart = Left(strCommandLeft, _
iMaxArgstringLength)
strCommandLeft = Mid(strCommandLeft, _
Len(strCommandPart) + 1)
visaddon.Run ("/S-ARGSTR " + strCommandPart)
Wend
visaddon.Run ("/S-RUN")
 

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