Solved

Visio VBA 2013 -  AUTO OPEN MACRO?

Posted on 2014-01-24
2
1,461 Views
Last Modified: 2014-01-27
I need a macro that runs when FILE XXXX is opened.  I need the Visio file to open on the first page of the file and have that page "fit to window"
Can someone help me?
0
Comment
Question by:brothertruffle880
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 30

Accepted Solution

by:
Scott Helmers earned 500 total points
ID: 39807280
Place this code into the ThisDocument module
Private Sub Document_DocumentOpened(ByVal doc As IVDocument)

    ActiveWindow.Page = doc.Pages(1)        ' move to page 1
    
    ActiveWindow.Zoom = -1                  ' set zoom to whole page

End Sub

Open in new window

0
 

Author Closing Comment

by:brothertruffle880
ID: 39812061
Excellent.   Works perfectly.
0

Featured Post

On Demand Webinar: Networking for the Cloud Era

Did you know SD-WANs can improve network connectivity? Check out this webinar to learn how an SD-WAN simplified, one-click tool can help you migrate and manage data in the cloud.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

The ability to add structure to Visio diagrams using containers, lists and callouts is one of my favorite features in Visio 2010. In this article we’ll examine containers. We’ll explore lists (http://www.experts-exchange.com/Microsoft/Applications/M…
The ability to add structure to Visio diagrams using containers, lists and callouts is one of my favorite features in Visio 2010. In this article we’ll examine lists. We’ll explore containers and callouts in separate articles. Prior to reading th…
In this video, viewers will be given step by step instructions on adjusting mouse, pointer and cursor visibility in Microsoft Windows 10. The video seeks to educate those who are struggling with the new Windows 10 Graphical User Interface. Change Cu…
There's a multitude of different network monitoring solutions out there, and you're probably wondering what makes NetCrunch so special. It's completely agentless, but does let you create an agent, if you desire. It offers powerful scalability …

687 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question