P
Phil Galey
On the following web page:
http://www.duncanmackenzie.net/blog/Word-Automation-from-C-vs-VBNET/
it is stated that the following code works successfully in VB.NET:
Dim wordApp As New Word.Application()
Dim newDoc As Word.Document = wordApp.Documents.Add
newDoc.Range.Text = "Test"
newDoc.AttachedTemplate = "C:\....\Macmillan.dot"
wordApp.Visible = True
however, I am not able to get it to work. I'm using VB.NET 2002 on Windows
2000 Pro, with MSWord 2000 installed. When I run the above code, I receive
a "Call was rejected by callee" error. I referenced Word 9.0 object
library. I also tried running the code with Word open and with Word closed,
but the result is the same. Any idea why I am not able to instantiate the
Word application and how to get it to work? It works ok in VB6, but not in
VB.NET. Thanks.
Phillip
http://www.duncanmackenzie.net/blog/Word-Automation-from-C-vs-VBNET/
it is stated that the following code works successfully in VB.NET:
Dim wordApp As New Word.Application()
Dim newDoc As Word.Document = wordApp.Documents.Add
newDoc.Range.Text = "Test"
newDoc.AttachedTemplate = "C:\....\Macmillan.dot"
wordApp.Visible = True
however, I am not able to get it to work. I'm using VB.NET 2002 on Windows
2000 Pro, with MSWord 2000 installed. When I run the above code, I receive
a "Call was rejected by callee" error. I referenced Word 9.0 object
library. I also tried running the code with Word open and with Word closed,
but the result is the same. Any idea why I am not able to instantiate the
Word application and how to get it to work? It works ok in VB6, but not in
VB.NET. Thanks.
Phillip