Hello
When I wrote the following VB.NET codes, I encountered error message "RPC server is unavailable." How can I solve this problem?
My original intention was to display the table data inside the MS Word document (johntable.doc). Please help.
The second time I used the x (Word.Cell), "RPC server is unavailable" error comes out! The first time I used the x I can sucessfully display table data though.
John Wen
When I wrote the following VB.NET codes, I encountered error message "RPC server is unavailable." How can I solve this problem?
My original intention was to display the table data inside the MS Word document (johntable.doc). Please help.
The second time I used the x (Word.Cell), "RPC server is unavailable" error comes out! The first time I used the x I can sucessfully display table data though.
VB.NET:
Dim oWord As New Word.Application
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim x As Word.Cell = oWord.Documents.Open("c:\rubbish\johntable.doc").Content.Tables.Item(1).Cell(3, 5)
MsgBox(x.Range.Text)
x = oWord.Documents.Open("c:\rubbish\johntable.doc").Content.Tables.Item(1).Cell(4, 4) [COLOR="Red"]<--second time using x[/COLOR]
MsgBox(x.Range.Text)
End Sub
John Wen
Last edited: