T
Trefor
I am trying to get the data from a document that is full of frames. When I
run the code below I get what I need, but not in the order I need it. I
didn't create the original document and I presume the frame numbers are not
laid out left to right and from top to bottom so I get this unusual order of
data. How can I ensure the date is read left to right and top to bottom?
Sub getframetest()
Dim Word As New Word.Application
Dim WordDoc As New Word.document
Dim oFrame As Word.Frame
Dim TextVar As String
Word.Visible = True
Set WordDoc = Word.Documents.Open("C:\temp\InstNotRpt.rtf")
For Each oFrame In WordDoc.frames
TextVar = oFrame.Range
Next
Word.Application.Quit
Set Word = Nothing
End Sub
run the code below I get what I need, but not in the order I need it. I
didn't create the original document and I presume the frame numbers are not
laid out left to right and from top to bottom so I get this unusual order of
data. How can I ensure the date is read left to right and top to bottom?
Sub getframetest()
Dim Word As New Word.Application
Dim WordDoc As New Word.document
Dim oFrame As Word.Frame
Dim TextVar As String
Word.Visible = True
Set WordDoc = Word.Documents.Open("C:\temp\InstNotRpt.rtf")
For Each oFrame In WordDoc.frames
TextVar = oFrame.Range
Next
Word.Application.Quit
Set Word = Nothing
End Sub