WillemM
December 3rd, 2002, 02:34 AM
I am working on a piece of code that prints out a Word document from my VB.NET program on a predefined time. It does print, but not shutdown the Word application....
I have this code now, but it won't compile since VS.NET complains about ambigious names when I put in wrdApp.Quit() function.... :(
If m_type = enumType.Word Then
Dim wrdApp As New Microsoft.Office.Interop.Word.Application()
Dim wrdDoc As New Microsoft.Office.Interop.Word.Document()
wrdDoc = wrdApp.Documents.Open(m_command)
wrdDoc.PrintOut()
wrdApp.Application.Quit()
End If
Anyone can solve this ?
I have this code now, but it won't compile since VS.NET complains about ambigious names when I put in wrdApp.Quit() function.... :(
If m_type = enumType.Word Then
Dim wrdApp As New Microsoft.Office.Interop.Word.Application()
Dim wrdDoc As New Microsoft.Office.Interop.Word.Document()
wrdDoc = wrdApp.Documents.Open(m_command)
wrdDoc.PrintOut()
wrdApp.Application.Quit()
End If
Anyone can solve this ?