Robertson1995
Board Regular
- Joined
- Apr 1, 2009
- Messages
- 123
I am using VBA in a program called Reflections WRQ. I am trying to create a code that will copy the screen display into excel. When I try to run this I get "Object doesnt support this property or method" and the error is on the "displaytext = .gettext" line. Any help would be much appreciated. Thanks.
Sub text2()
Dim displaytext As String
With Session
displaytext = .gettxt(.ScreenTopRow, 0, .ScreenTopRow + .DisplayColumns, .DisplayColumns)
End With
Dim word As word.Application
Set word = CreateObject("word.application")
word.Visible = True
word.Documents.Add
word.Selection.TypeText text:=displaytext
End Sub
Sub text2()
Dim displaytext As String
With Session
displaytext = .gettxt(.ScreenTopRow, 0, .ScreenTopRow + .DisplayColumns, .DisplayColumns)
End With
Dim word As word.Application
Set word = CreateObject("word.application")
word.Visible = True
word.Documents.Add
word.Selection.TypeText text:=displaytext
End Sub