Problem Closing and Reopening Frontpage Object from VB NET

G

Guest

The Code Snippet (from VB Net in Visual Studio Net 2003) below does the following

(1) Create a Front Page (2002) Application Objec
(2) Open a We
(3) Close the We
(4) Execute Front Page Application Object "quit" method


Proble
------

I cannot run the snippet below twice without first shutting down my program. Here i
the error I get the second time my code tries to create a FrontPage Application Object

Generic Exception Handler: {0} System.Runtime.InteropServices.COMException (0x80004005): Unspecified erro

But wait, there is more

The first time I run the snippet, the Image Name "FRONGPG.exe" shows up in the
Windows Task Manager, under the "Processes" Tab. If I wait long enough (five o
ten or maybe fifteen minutes) "FRONGPG.exe" goes away and then I can run my
snippet again without restarting my program

HELP PLEAS
----------

Any Suggestions


'***************************************************************************
' Code Snippe
'***************************************************************************
Private Sub btnTest3_Click_1(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnTest3.Clic
Dim WebName As String = "C:\Documents and Settings\Rolf\My Documents\FrontPage Projects\D2
Dim myWeb As FrontPage.WebE
Tr
'Create the FrontPage Application Objec
'fpApp = new FrontPage.Application <= This can be used instead o
' CreateObjec
fpApp = CreateObject("FrontPage.Application"
'Open a We
myWeb = fpApp.Webs.Open(WebName, , , FrontPage.FpWebOpenFlags.fpOpenNoWindow


'Now close the we
myWeb.Close(
'Quit the FrontPage Application Objec
log("FrontPage Application Object quit" + ControlChars.CrLf
fpApp.Quit(
fpApp = Nothin
Catch ex As Exceptio
log("Generic Exception Handler: {0} " + ex.ToString()
End Tr
End Su
 

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