Solved

Saving visio file as a webpage

Posted on 2007-11-28
7
590 Views
Last Modified: 2008-02-01
I am looking for VBA code for saving a visio file with multiple pages into a web page.

thanks
sunil
0
Comment
Question by:sunilramu
[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
  • 3
  • 2
7 Comments
 

Author Comment

by:sunilramu
ID: 20366050
i forgot to mention that my visio file might have multiple pages in it.

thanks
0
 
LVL 30

Accepted Solution

by:
Scott Helmers earned 500 total points
ID: 20368913
Are you ready for how easy this is??

There are all sort of variations to set path name and other parameters, including using SaveAsEx instead of SaveAs, but the attached code will do the trick. The key is merely to use .htm as the file extension in the save as command.

When the save completes, look for Sample Drawing.htm and pop it into Internet Explorer.
Sub SaveAsWebPage()
 
    Application.ActiveDocument.SaveAs "C:\temp\Sample Drawing.htm"
 
End Sub

Open in new window

0
 
LVL 30

Expert Comment

by:Scott Helmers
ID: 20369512
One additional thought regarding my previous posting --

You may already know this if you've played with this function manually, but Visio creates two things when you use Save as Web Page: 1) an index file and 2) a subdirectory that contains all of the pages from your drawing, image files, javascript files, XML files and various other widgets. Using the code snippet from my previous posting:

The index file will be called "Sample Drawing.htm"

The subdirectory will be called "Sample Drawing_files"
0
Free Backup Tool for VMware and Hyper-V

Restore full virtual machine or individual guest files from 19 common file systems directly from the backup file. Schedule VM backups with PowerShell scripts. Set desired time, lean back and let the script to notify you via email upon completion.  

 

Author Comment

by:sunilramu
ID: 20369767
thanks scott,

how do i incorporate this into my vb application (not VBA). thanks
0
 
LVL 30

Expert Comment

by:Scott Helmers
ID: 20370592
Not sure I can help you with VB -- you asked for VBA code and that's what I gave you!
0
 
LVL 1

Expert Comment

by:Computer101
ID: 20658523
Forced accept.

Computer101
EE Admin
0

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Scott A. Helmers Partner, Harvard Computing Group Microsoft Visio MVP Background Microsoft has added more enhancements and new features to Visio 2010 than to any release since they purchased the Visio product line in 2000. In addition, the com…
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…
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…
NetCrunch network monitor is a highly extensive platform for network monitoring and alert generation. In this video you'll see a live demo of NetCrunch with most notable features explained in a walk-through manner. You'll also get to know the philos…

627 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