Reflections WRQ copy to Excel

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
 

Excel Facts

How can you turn a range sideways?
Copy the range. Select a blank cell. Right-click, Paste Special, then choose Transpose.
Hi,

I don't know anything about Reflections WRQ. Your code is for copying of the text into Word document, but not into the Excel sheet as you’ve mentioned.

There is no internal Session class object in VBA Excel.
If you add the topmost line Option Explicit then you will get debugger error on Session.
Seems, that you should set reference to external library (usually it’s DLL file) with Session object. In VBA the reference can be set from VBE – menu Tools – References. Have a look on the manual of Reflections WRQ if exist, or contact to supporting team of this tool.

Vladimir
 
Upvote 0
Hi
I dont think that Reflections has a gettxt method - try changing it to GetDisplayText instead - it works for me

Wolfshead
 
Upvote 0

Forum statistics

Threads
1,225,409
Messages
6,184,828
Members
453,263
Latest member
LoganAlbright

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top