|
Public Class Word
Friend Shared ReadOnly Property WordApp() As Microsoft.Office.Interop.Word.Application
Get
Static mc_WordApp As Microsoft.Office.Interop.Word.Application = Nothing
If mc_WordApp Is Nothing Then
mc_WordApp = New Microsoft.Office.Interop.Word.Application
mc_WordApp.Documents.Add()
AddHandler Application.ApplicationExit, AddressOf ApplicationExit
mc_WordApp.DisplayAlerts = Microsoft.Office.Interop.Word.WdAlertLevel.wdAlertsAll
'mc_WordApp.Visible = True
End If
Return mc_WordApp
End Get
End Property
Private Shared Sub ApplicationExit(ByVal sender As Object, ByVal e As System.EventArgs)
WordApp.Quit()
End Sub
End Class
|
By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.
If a file you wish to view isn't highlighted, and is a text file (not binary), please
let us know and we'll add colourisation support for it.