I
Igor G.
I need some code to export my Visio drawing to HTML?
Thanks!
Thanks!
How's about referencing the Visio SaveAsWeb Type library?
John Goldsmith_Visio_MVP said:Hello Igor,
The DoCmd code will invoke the UI command and will automatically display the
dialog. If you want to provide default values and suppress the dialog
you'll need to use the SaveAsWeb library as David and SteveM suggest or use
the command line option
(http://msdn.microsoft.com/en-us/library/aa463347.aspx)
I thought I'd write up a quick blog post on this and I'll post back here
when it's up, but in the meantime you can tryout this code which is adapted
from the Help files:
Public Sub MyProcedure()
Call SaveAsWeb(ThisDocument,
"c:\users\[USERNAME]\MySaveAsWebStuff.htm")
End Sub
Public Sub SaveAsWeb(ByVal targetVisDoc As Document, tgtPath As String)
Dim vsoSaveAsWeb As VisSaveAsWeb
Dim vsoWebSettings As VisWebPageSettings
' Get a VisSaveAsWeb object that
' represents a new Web page project.
Set vsoSaveAsWeb = Visio.Application.SaveAsWebObject
' Get a VisWebPageSettings object.
Set vsoWebSettings = vsoSaveAsWeb.WebPageSettings
' Configure preferences.
With vsoWebSettings
'.StartPage = 1 'Defaults to first page
'.EndPage = 2 'Defaults to last page
.QuietMode = True ' Hides user controlled dialogs
.OpenBrowser = False
.SilentMode = True 'Setting to TRUE will override the above two
properties
.TargetPath = tgtPath ' Output path in the following format:
"c:\your_folder_name\your_filename.htm"
.StoreInFolder = True 'adds support files to "your_filename_files"
folder
End With
' Generate Save As Web output
vsoSaveAsWeb.AttachToVisioDoc targetVisDocument 'Set the Visio document
to save (defaults to active if not set)
vsoSaveAsWeb.CreatePages ' Generate output
End Sub
Best regards
John
John Goldsmith (Visio MVP)
www.visualSignals.typepad.co.uk
www.visualSignals.co.uk
.Igor G. said:Thanks, it's OK!
How to automaticaly send parametar Save (through existing file) when popup
is opened?
Igor G. said:Thanks!
John Goldsmith_Visio_MVP said:Hello Igor,
The DoCmd code will invoke the UI command and will automatically display
the
dialog. If you want to provide default values and suppress the dialog
you'll need to use the SaveAsWeb library as David and SteveM suggest or
use
the command line option
(http://msdn.microsoft.com/en-us/library/aa463347.aspx)
I thought I'd write up a quick blog post on this and I'll post back here
when it's up, but in the meantime you can tryout this code which is
adapted
from the Help files:
Public Sub MyProcedure()
Call SaveAsWeb(ThisDocument,
"c:\users\[USERNAME]\MySaveAsWebStuff.htm")
End Sub
Public Sub SaveAsWeb(ByVal targetVisDoc As Document, tgtPath As String)
Dim vsoSaveAsWeb As VisSaveAsWeb
Dim vsoWebSettings As VisWebPageSettings
' Get a VisSaveAsWeb object that
' represents a new Web page project.
Set vsoSaveAsWeb = Visio.Application.SaveAsWebObject
' Get a VisWebPageSettings object.
Set vsoWebSettings = vsoSaveAsWeb.WebPageSettings
' Configure preferences.
With vsoWebSettings
'.StartPage = 1 'Defaults to first page
'.EndPage = 2 'Defaults to last page
.QuietMode = True ' Hides user controlled dialogs
.OpenBrowser = False
.SilentMode = True 'Setting to TRUE will override the above two
properties
.TargetPath = tgtPath ' Output path in the following format:
"c:\your_folder_name\your_filename.htm"
.StoreInFolder = True 'adds support files to
"your_filename_files"
folder
End With
' Generate Save As Web output
vsoSaveAsWeb.AttachToVisioDoc targetVisDocument 'Set the Visio
document
to save (defaults to active if not set)
vsoSaveAsWeb.CreatePages ' Generate output
End Sub
Best regards
John
John Goldsmith (Visio MVP)
www.visualSignals.typepad.co.uk
www.visualSignals.co.uk
.Igor G. said:Thanks, it's OK!
How to automaticaly send parametar Save (through existing file) when
popup
is opened?
:
Or, if you like this.
Application.DoCmd visCmdFileSaveAsWebPage
--
Best Regards.
JuneTheSecond
Now, visual calculation is more visual.
http://www.geocities.jp/visualcalculation/english/index.html
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.