I think posting in the MSWord newsgroup is an excellent idea.
But after struggling with MSWord, this did work:
Option Explicit
Sub testme01()
Dim WDApp As Word.Application
Dim WDDoc As Word.Document
Dim myWDRange As Word.Range
Set WDApp = Nothing
On Error Resume Next
Set WDApp = GetObject(, "Word.Application")
If Err.Number <> 0 Then
MsgBox "Word isn't running!"
Exit Sub
End If
WDApp.Visible = True 'at least for testing, just to make sure
Set WDDoc = Nothing
On Error Resume Next
Set WDDoc = WDApp.ActiveDocument
On Error GoTo 0
If WDDoc Is Nothing Then
MsgBox "No activedocument in Word"
Exit Sub
End If
With WDDoc
Set myWDRange = .Range.Tables(1).Rows(1).Cells(1).Range
End With
ActiveCell.Value = myWDRange.Text
End Sub
Dave,
Actually I added the following to your sample code:
Dim mywdRange As Word.Range
With mywdRange
Selection.WholeStory <------ This Line Errors with 438
Selection.Tables(1).Select <------ This Line Errors with 438
Selection.SelectRow
Selection.Copy
End With
WDDoc.Selection.WholeStory <------ This Line Errors with 438
"Microsoft Word x.xx Object library". <--- I had already set this
I just tried creating a new word doc, with just one word on a blank page,
same problem. I will post to the Word newsgroup.
Many thanks for your assistance.