cancel
Showing results for 
Search instead for 
Did you mean: 

MS Word - Go to End of Document

jgregor4
Level 6

I have a modified MS Word VBO to paste a collection as a table into a document however the cursor then sits within the table.  I have more text and tables to add into the document and these get added to the table.
I have been trying to create an action that would mimic Ctrl+End to get to the end of the document but can't get it to work as the standard VBA that word has doesnt translate into BP.

Does anyone have an action to move the end of a document in word?



------------------------------
James Gregory
RPA Developer
Europe/London
------------------------------
2 REPLIES 2

JukkaSalovaara
Level 3
Hi,
Could you just send the actual Ctrl+End key presses to the Word application window by using key events?

------------------------------
Jukka Salovaara
Solutions consultant
Digital Workforce Services Oy
Europe/Helsinki
------------------------------

IZ
Level 2

You can try with:

Dim doc As Object = GetDocument(handle,documentname)
 doc.Content.InsertAfter(text)

Or define range
Dim rngRange As Object
rngRange = _
 doc.Range(Doc.Range.End - 1,Doc.Range.End)

rngRange.InsertAfter(text)



------------------------------
Irmina Zalewska
Robotic Process Automation Engineer
Credit Suisse
Europe/London
------------------------------