Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Automating Excel - Trouble With Visibility
Message
 
À
24/06/2004 11:40:44
Information générale
Forum:
ASP.NET
Catégorie:
Autre
Divers
Thread ID:
00916596
Message ID:
00916887
Vues:
7
Here is the code I used for Word but it must be similar to Excel:
I did not have any issue with closing the app.
Hope you find this helpful:
        Dim WordApp As Word.Application
        Dim oDoc As Document = New Word.Document
        Dim oMissing As Object
        oMissing = System.Reflection.Missing.Value
        'Util.LogMessage("Before Processing Word")
         Try
           oDoc = WordApp.Documents.Open(Me.TemplateOutputPath & "\" & Me.GUIDName & ".doc", oMissing, oMissing, oMissing, oMissing, oMissing, oMissing, oMissing, oMissing)
            Catch ex As Exception
            Finally

            oDoc.Close(False)
            System.Runtime.InteropServices.Marshal.ReleaseComObject(oDoc)
            oDoc = Nothing
            WordApp.Quit(oMissing, oMissing, oMissing)
            System.Runtime.InteropServices.Marshal.ReleaseComObject(WordApp)
            WordApp = Nothing
            'Util.LogMessage("BuildWordDoc - Close word app")
        End Try
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform