D
Dan
I am using Visual Basic 6 to automate Visio 2002 on a
Windows XP machine. In a class module, I have code to open
the SaveAs Dialog window followed by the FileSummaryInfo
dialog.
Visio raises error -2032466955 when the user clicks the
Cancel button on the File Properties dialog. Visio also
raises the same error when the user clicks OK without
entering any information in the form fields (subject,
author, company...).
This macro code shows how to reproduce the issue with the
FileSummaryInfo dialog.
- Open a drawing using the Basic Diagram Visio Template.
- Open the VBA Editor (alt-f11)
- Copy and paste the code in the ThisTemplate VBA module:
Private Sub Document_ShapeAdded(ByVal Shape As IVShape)
On Error GoTo SAVE_AS_HANDLER
' show Visio Save As dialog box
Application.DoCmd visCmdFileSaveAs ' OK, no problem!
On Error GoTo FILE_INFO_SUMMARY_HANDLER
' Visio raises error -2032466955 when user clicks 'Cancel'
on the File Property Dialog
' Visio also raises the error when user clicks OK without
entering any data in the File Property Dialog
' show Visio File Properties dialog box: title, author,
description...
Application.DoCmd (visCmdFileSummaryInfoDlg)
Exit Sub
SAVE_AS_HANDLER:
Debug.Print "SaveAs error: '" & Err.Number & "' " &
Err.Description
FILE_INFO_SUMMARY_HANDLER:
Debug.Print "FileSummaryInfoDlg error: '" & Err.Number
& "' " & Err.Description
End Sub
- Drop a shape on the drawing.
- In the immediate window of the VBA editor you will see:
FileSummaryInfoDlg error: '-2032466955' Cancel.
I've tried this with and without the 'Prompt for document
properties" option setting.(Tools->Options->Save tab).
What's wrong with the above code?
I've submitted this to the Microsoft online support but
was not provided with a fix or a workaround like they did
in the past for an issue with the accelerator menu.
Thanks
Windows XP machine. In a class module, I have code to open
the SaveAs Dialog window followed by the FileSummaryInfo
dialog.
Visio raises error -2032466955 when the user clicks the
Cancel button on the File Properties dialog. Visio also
raises the same error when the user clicks OK without
entering any information in the form fields (subject,
author, company...).
This macro code shows how to reproduce the issue with the
FileSummaryInfo dialog.
- Open a drawing using the Basic Diagram Visio Template.
- Open the VBA Editor (alt-f11)
- Copy and paste the code in the ThisTemplate VBA module:
Private Sub Document_ShapeAdded(ByVal Shape As IVShape)
On Error GoTo SAVE_AS_HANDLER
' show Visio Save As dialog box
Application.DoCmd visCmdFileSaveAs ' OK, no problem!
On Error GoTo FILE_INFO_SUMMARY_HANDLER
' Visio raises error -2032466955 when user clicks 'Cancel'
on the File Property Dialog
' Visio also raises the error when user clicks OK without
entering any data in the File Property Dialog
' show Visio File Properties dialog box: title, author,
description...
Application.DoCmd (visCmdFileSummaryInfoDlg)
Exit Sub
SAVE_AS_HANDLER:
Debug.Print "SaveAs error: '" & Err.Number & "' " &
Err.Description
FILE_INFO_SUMMARY_HANDLER:
Debug.Print "FileSummaryInfoDlg error: '" & Err.Number
& "' " & Err.Description
End Sub
- Drop a shape on the drawing.
- In the immediate window of the VBA editor you will see:
FileSummaryInfoDlg error: '-2032466955' Cancel.
I've tried this with and without the 'Prompt for document
properties" option setting.(Tools->Options->Save tab).
What's wrong with the above code?
I've submitted this to the Microsoft online support but
was not provided with a fix or a workaround like they did
in the past for an issue with the accelerator menu.
Thanks