Author Topic: Default Zoom Level in Visio Standard 2003  (Read 15201 times)

0 Members and 1 Guest are viewing this topic.

k-man

  • Newbie
  • *
  • Posts: 5
Default Zoom Level in Visio Standard 2003
« on: June 02, 2008, 08:45:34 AM »

Dear Visio Guy and Visio users,

I'm running Visio Standard 2003 and I have an issue with zoom levels.

Let me explain:
I change the zoom level on a page (zoom in or zoom out) while working with a vsd file.
Then I close the file and open it again. I go to the same page and the zoom level is the same as when I closed the document.

My question is: Is there a way to set a zoom level, let's say 80% for all pages in a vsd file and disable the property that makes Visio
remember the zoom level settings?

I'd be greatful for any tips and suggestions on this one!

Cheers K-Man

Visio Guy

  • Administrator
  • Hero Member
  • *****
  • Posts: 1735
  • Smart Graphics for Visual People...n' Stuff
    • Visio Guy
Re: Default Zoom Level in Visio Standard 2003
« Reply #1 on: June 02, 2008, 08:51:29 AM »
K-man,

There is a way to save a "workspace", which remembers window positions, open files, etc.

I think in Visio 2003, you find it like this: File > Save As. The Save button is actually a drop-down, with a workspace check item.

In 2007, there's a Workspace checkbox under File > Properties.

You could write a fairly simple VBA script to zoom all the pages in the document, but I find this works better:

Ctrl + W

This will zoom-to-fit your page in the window.
For articles, tips and free content, see the Visio Guy Website at http://www.visguy.com
Get my Visio Book! Using Microsoft Visio 2010

k-man

  • Newbie
  • *
  • Posts: 5
Re: Default Zoom Level in Visio Standard 2003
« Reply #2 on: June 02, 2008, 09:34:12 AM »

Thank you Visio Guy for the prompt reply!
You should really consider that "buy me a beer"-app  :)

Hmmm, the work space toggle is great so Visio remembers your window setup and all but it still won't do
what I'm looking for...

You could of course, after you have made your changes to the document, press  Ctrl + W on every page and then save the document.
But that will be a lot of work if you have a large number of pages in the document... The best solution in my case would be
a tiny "on save" VB script that sets all pages in the document to a defined zoom level and goes to the "index page".

I have hardly any programming experience but maybe you can tell me if i'm on the correct path?

Private Sub Document_DocumentSaved(ByVal doc As IVDocument)
ZoomBehavior = visZoomInPlaceContainer
End Sub

/K

k-man

  • Newbie
  • *
  • Posts: 5
Re: Default Zoom Level in Visio Standard 2003
« Reply #3 on: June 02, 2008, 10:55:29 AM »
I found this article by googling:

http://visualsignals.typepad.co.uk/vislog/2008/04/synchronizing-p.html

I think it will come to help!

Lars-Erik

  • Sr. Member
  • ****
  • Posts: 278
Re: Default Zoom Level in Visio Standard 2003
« Reply #4 on: June 03, 2008, 04:55:24 AM »
If you are willing to use code...

Code
Private Sub Document_BeforeDocumentSave(ByVal doc As IVDocument)
Count = Application.ActiveDocument.Pages.Count
    For i = 1 To Count
    ActiveWindow.Page = Application.ActiveDocument.Pages.Item(i)
    Application.ActiveWindow.ViewFit = visFitPage
    Next
End Sub
Private Sub Document_BeforeDocumentSaveAs(ByVal doc As IVDocument)
Count = Application.ActiveDocument.Pages.Count
    For i = 1 To Count
    ActiveWindow.Page = Application.ActiveDocument.Pages.Item(i)
    Application.ActiveWindow.ViewFit = visFitPage
    Next
End Sub

That will do it. Note that there is no error checking, nor will it see if a page is a foreground of background page. When saving or saving as it will set ALL pages to fit zoom level.

- Lars

k-man

  • Newbie
  • *
  • Posts: 5
Re: Default Zoom Level in Visio Standard 2003
« Reply #5 on: June 03, 2008, 06:41:52 AM »
If you are willing to use code...

Code
Private Sub Document_BeforeDocumentSave(ByVal doc As IVDocument)
Count = Application.ActiveDocument.Pages.Count
    For i = 1 To Count
    ActiveWindow.Page = Application.ActiveDocument.Pages.Item(i)
    Application.ActiveWindow.ViewFit = visFitPage
    Next
End Sub
Private Sub Document_BeforeDocumentSaveAs(ByVal doc As IVDocument)
Count = Application.ActiveDocument.Pages.Count
    For i = 1 To Count
    ActiveWindow.Page = Application.ActiveDocument.Pages.Item(i)
    Application.ActiveWindow.ViewFit = visFitPage
    Next
End Sub

That will do it. Note that there is no error checking, nor will it see if a page is a foreground of background page. When saving or saving as it will set ALL pages to fit zoom level.

- Lars


Spot on!
Works great, thanks a lot Lars-Erik!

Visio Guy

  • Administrator
  • Hero Member
  • *****
  • Posts: 1735
  • Smart Graphics for Visual People...n' Stuff
    • Visio Guy
Re: Default Zoom Level in Visio Standard 2003
« Reply #6 on: June 03, 2008, 09:05:41 AM »
Thank you Visio Guy for the prompt reply!
You should really consider that "buy me a beer"-app  :)

:)  Reward Helpful Posters With "Buy Me a Beer" Donation  :)
For articles, tips and free content, see the Visio Guy Website at http://www.visguy.com
Get my Visio Book! Using Microsoft Visio 2010

k-man

  • Newbie
  • *
  • Posts: 5
Re: Default Zoom Level in Visio Standard 2003
« Reply #7 on: June 04, 2008, 06:15:02 AM »
Thank you Visio Guy for the prompt reply!
You should really consider that "buy me a beer"-app  :)

:)  Reward Helpful Posters With "Buy Me a Beer" Donation  :)

enjoy your beers guys!  ;D

Lars-Erik

  • Sr. Member
  • ****
  • Posts: 278
Re: Default Zoom Level in Visio Standard 2003
« Reply #8 on: June 04, 2008, 06:37:19 AM »
I sure will! Thanks!

Visio Guy

  • Administrator
  • Hero Member
  • *****
  • Posts: 1735
  • Smart Graphics for Visual People...n' Stuff
    • Visio Guy
Re: Default Zoom Level in Visio Standard 2003
« Reply #9 on: June 04, 2008, 07:01:17 AM »
Thanks K-man!

*Glurp*
For articles, tips and free content, see the Visio Guy Website at http://www.visguy.com
Get my Visio Book! Using Microsoft Visio 2010