Solved

Saving visio file as a webpage

Posted on 2007-11-28
7
565 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
  • 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
What Should I Do With This Threat Intelligence?

Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

 

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

Why You Should Analyze Threat Actor TTPs

After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

Join & Write a Comment

The Question Several times in recent years, someone has posted a question at EE asking whether they could display the Windows directory structure – folders and subfolders – using Visio. When one person specifically asked about displaying directory …
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…
Sending a Secure fax is easy with eFax Corporate (http://www.enterprise.efax.com). First, Just open a new email message.  In the To field, type your recipient's fax number @efaxsend.com. You can even send a secure international fax — just include t…
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…

758 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