Reflections VBA to Excel copy and paste (Screen Scrape)

kroters

New Member
Joined
Jan 1, 2015
Messages
7
i am looking to copy data from Reflections workspace using VBA. i want to copy data on a page and paste into excel. i have done a macro in refelections to get the correct areas to select and copy. i then want to paste the data into excel go back to reflections and copy the next page and paste into excel (not overiding previous data). the below will copy current text on screen then Y to next screen.

'Select and copy text from the screen
osCurrentScreen.SelectText 9, 1, 22, 77, RegionOption_Wrapped
' Press EditCopy (Copy the selection and put it on the Clipboard).
osCurrentScreen.copy
osCurrentScreen.SendKeys "y"
'Wait for a string on the host screen before continuing
' returnValue = osCurrentScreen.WaitForString3(ESC & "[63C", NEVER_TIME_OUT, WaitForOption.WaitForOption_AllowKeystrokes)
' End If
Exit Sub
 

Excel Facts

Control Word Wrap
Press Alt+Enter to move to a new row in a cell. Lets you control where the words wrap.
Is the macro run from an Excel workbook?
What sheet and which starting cell does the data need to be pasted in?
 
Upvote 0
Hi Anychance you can share the full code from DIM Settings so i can have Excel take data from Reflections, enter in the home section etc
 
Upvote 0
i am looking to copy data from Reflections workspace using VBA. i want to copy data on a page and paste into excel. i have done a macro in refelections to get the correct areas to select and copy. i then want to paste the data into excel go back to reflections and copy the next page and paste into excel (not overiding previous data). the below will copy current text on screen then Y to next screen.

'Select and copy text from the screen
osCurrentScreen.SelectText 9, 1, 22, 77, RegionOption_Wrapped
' Press EditCopy (Copy the selection and put it on the Clipboard).
osCurrentScreen.copy
osCurrentScreen.SendKeys "y"
'Wait for a string on the host screen before continuing
' returnValue = osCurrentScreen.WaitForString3(ESC & "[63C", NEVER_TIME_OUT, WaitForOption.WaitForOption_AllowKeystrokes)
' End If
Exit Sub
Kroters, can you detail the settings you used for both the reflections workspace and how you identified them in the VBA in Excel also please.

for example did you have to name a session and refer directly to it in the vba, if you did the detail on how this was done and then how you entered maybe a sendkey from VBA to the session. this will help me out massively
thanks
 
Upvote 0
Hi,
can someone help detail the settings you used for both the reflections workspace and how you identified them in the VBA in Excel also please.

for example did you have to name a session and refer directly to it in the vba, if you did the detail on how this was done and then how you entered maybe a sendkey from VBA to the session. this will help me out massively
thanks
 
Upvote 0

Forum statistics

Threads
1,214,599
Messages
6,120,448
Members
448,966
Latest member
DannyC96

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