Welcome to WebmasterWorld Guest from 54.196.224.166

Forum Moderators: phranque

Message Too Old, No Replies

Visio process hangs exporting to html

process hangs when exported thru code

     

mittu

5:18 am on May 28, 2008 (gmt 0)

5+ Year Member



hi,
im writing a code to export visio to html
======================================
Protected Sub converttoxml(ByVal strFileName As String, ByVal app As Microsoft.Office.Interop.Visio.Application)
'Dim app As New Microsoft.Office.Interop.Visio.Application
Try

' app.Documents.Open(Server.MapPath("../filestoread") & "\" & strFileName.Replace(" ", "") & ".vsd")
app.Documents.OpenEx(Server.MapPath("../filestoread") & "\" & strFileName.Replace(" ", "") & ".vsd", CShort(Microsoft.Office.Interop.Visio.VisOpenSaveArgs.visOpenDocked) + CShort(Microsoft.Office.Interop.Visio.VisOpenSaveArgs.visOpenRO))

If File.Exists(Server.MapPath("../HTMFiles") & "\" & strFileName.Replace(" ", "") & ".htm") Then
File.Delete(Server.MapPath("../HTMFiles") & "\" & strFileName.Replace(" ", "") & ".htm")
End If
app.Addons.ItemU("SaveAsWeb").Run("/quiet=True /openbrowser=False /PanAndZoom=True /target=" & Server.MapPath("../HTMFiles") & "\" & strFileName.Replace(" ", "") & ".htm")
app.Quit()
Catch ex As Exception
Response.Write(ex.Message)
End Try

End Sub
======================================================

the problem im facing here is when control reacheds to app.documents.open,the visio process hangs & the visio file is not exported to html

any help on this?

encyclo

2:24 pm on May 29, 2008 (gmt 0)

WebmasterWorld Senior Member encyclo is a WebmasterWorld Top Contributor of All Time 10+ Year Member



Welcome to WebmasterWorld mittu - does Visio have any error console or error log which could explain why the process is hanging?