Solved

Visio 2013 - VBA - Open File procedure

Posted on 2014-04-01
2
465 Views
Last Modified: 2014-04-01
I would like to run the procedure below (with a few additional lines of enhancements).  
- Is there any way I can generate a message to appear saying "Please wait" as soon as the file is opened so that the user doesn't start typing away as soon as they see a glimmer of their diagram.  
- Is there any way I can block keyboard entry until after the procedure below is run?  Perhaps blank out the screen with the "Please wait" message?

Private Sub Document_DocumentOpened(ByVal doc As IVDocument)

    Set Win1 = ActiveWindow

    ActiveWindow.Page = doc.Pages(1)        ' move to page 1
    
    ActiveWindow.Zoom = -1                  ' set zoom to whole page
    
   '  more code to be input here
   '  more code to be input here

    MsgBox "You are ready to work." 


End Sub

Open in new window

0
Comment
Question by:brothertruffle880
2 Comments
 
LVL 48

Accepted Solution

by:
Rgonzo1971 earned 500 total points
ID: 39969180
Hi,
pls try
Private Sub Document_DocumentOpened(ByVal doc As IVDocument)
Application.ShowChanges = False

    Set Win1 = ActiveWindow

    ActiveWindow.Page = doc.Pages(1)        ' move to page 1
    
    ActiveWindow.Zoom = -1                  ' set zoom to whole page
    
   '  more code to be input here
   '  more code to be input here

Application.ShowChanges = True
    MsgBox "You are ready to work." 


End Sub

Open in new window

Regards
0
 

Author Comment

by:brothertruffle880
ID: 39969396
Thanks Rgonzo!
Perfect.
0

Featured Post

Highfive + Dolby Voice = No More Audio Complaints!

Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

Join & Write a Comment

Periodically someone asks me whether there’s a way to automatically convert all of the pages in a Visio drawing to PowerPoint slides. There have even been a few times when I’ve wanted to do that myself but I never really had enough incentive to figu…
David Parker’s latest book, Microsoft Visio 2010: Business Process Diagramming and Validation, will give you the tools to turn flowcharts and other business diagrams into valuable, data-driven corporate assets. Armed with the knowledge you’ll gain f…
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.
This video explains how to create simple products associated to Magento configurable product and offers fast way of their generation with Store Manager for Magento tool.

762 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

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now