Visio2002: "Disable Macros" Message When You Open Web Site Map Drawing (299105)



The information in this article applies to:

  • Microsoft Visio 2002 Professional

This article was previously published under Q299105

SYMPTOMS

When you open a Web site drawing in Microsoft Visio, you may receive a warning message similar to the following:

<File name> contains macros. Macros may contain viruses. It is always safe to disable macros, but if the macros are legitimate, you might lose some functionality.

CAUSE

This behavior occurs when one or more of the following conditions is true:
  • The drawing has a Visual Basic for Applications (VBA) project, including macros.
  • The drawing was created in Visio 2000 when VBA was turned on.
When a Web Site drawing is created in Visio 2000 with VBA turned on, an empty VBA project is added to the document. This causes a macro warning when the drawing is opened in Visio 2002.

RESOLUTION

Use of the following methods to prevent this warning message in the future.

Method 1: Save File in Visio 2002

If the drawing does not contain macros, save the files in Visio 2002. This prevents the error message by removing the empty project.

Method 2: Turn Off VBA

Follow these steps to turn off VBA in Visio 2002:
  1. Start Visio.
  2. On the Tools menu, click Options.
  3. On the Advanced tab, click to clear the Enable Microsoft Visual Basic for Applications check box, and then click OK.

Method 3: Programmatically Open a Drawing Without VBA

Microsoft provides programming examples for illustration only, without warranty either expressed or implied, including, but not limited to, the implied warranties of merchantability and/or fitness for a particular purpose. This article assumes that you are familiar with the programming language being demonstrated and the tools used to create and debug procedures. Microsoft support professionals can help explain the functionality of a particular procedure, but they will not modify these examples to provide added functionality or construct procedures to meet your specific needs. If you have limited programming experience, you may want to contact a Microsoft Certified Partner or the Microsoft fee-based consulting line at (800) 936-5200. For more information about Microsoft Certified Partners, please visit the following Microsoft Web site: For more information about the support options that are available and about how to contact Microsoft, visit the following Microsoft Web site: Use the following code to open a drawing in a VBA macro without getting the macro warning message:
Visio.Documents.OpenEx ("FileName"), visOpenMacrosDisabled
				

STATUS

Microsoft has confirmed that this is a problem in the Microsoft products that are listed at the beginning of this article.

Modification Type:MinorLast Reviewed:10/11/2006
Keywords:kbbug kbdtacode kbpending KB299105