Microsoft KB Archive/299105

= Visio2002: &quot;Disable Macros&quot; Message When You Open Web Site Map Drawing =

Article ID: 299105

Article Last Modified on 11/23/2006

-

APPLIES TO


 * Microsoft Visio 2002 Professional Edition

-



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:

 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:

https://partner.microsoft.com/global/30000104

For more information about the support options that are available and about how to contact Microsoft, visit the following Microsoft Web site:

http://support.microsoft.com/default.aspx?scid=fh;EN-US;CNTACTMS

Use the following code to open a drawing in a VBA macro without getting the macro warning message: Visio.Documents.OpenEx (&quot;FileName&quot;), visOpenMacrosDisabled



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

Additional query words: prb vb vba vbe

Keywords: kbbug kbdtacode kbpending KB299105

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.