Visio 2007 Save as web page to a sharepoint folder

R

Roy G

Hi all,
I am trying to save a file using the "IVisSaveAsWeb" interface. saving to a
regular folder is completed successfully but to a sharepoint folder it fails.
The code -
string sTargetDir = "http://some sharepoint folder url";

IVisSaveAsWeb objSaveAsWeb;
IVisWebPageSettings objWebPageSettings;

// Get a VisSaveAsWeb object that represents a new Web page
project
objSaveAsWeb = visioApplication.SaveAsWebObject as IVisSaveAsWeb;

// Get a VisWebPageSettings object
objWebPageSettings = objSaveAsWeb.WebPageSettings as
IVisWebPageSettings;

// Configure Web-page settings
objWebPageSettings.StartPage = 1;
objWebPageSettings.EndPage =
visioApplication.ActiveDocument.Pages.Count;
objWebPageSettings.LongFileNames = 1;
objWebPageSettings.TargetPath = sTargetDir + @"\" + fileName;
objWebPageSettings.QuietMode = 1;
objWebPageSettings.SilentMode = 1;
objWebPageSettings.OpenBrowser = 0;

// Now create the pages; because we did not identify
// a particular document, the active document is saved
objSaveAsWeb.CreatePages();

The Exception -
"There was an error attempting to create a temp folder. "

needless to say that through the visio application the saving to a
sharepoint folder is performed successfully.

any help will be highly appreciated.
Roy
 

Ask a Question

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.

Ask a Question

Top