Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 03-27-2023, 12:21 AM
Dimsok Dimsok is offline Go to end of document Windows XP Go to end of document Office 2007
Advanced Beginner
Go to end of document
 
Join Date: Sep 2014
Location: exUSSR
Posts: 50
Dimsok is on a distinguished road
Default Go to end of document

I need to go to the end of document after open document. I don't know why, but build in macro "GoToLastPg" doesn't work for me. I use such code:



Code:
Sub AutoOpen()
Selection.EndKey Unit:=wdStory
End Sub
But not puts cursor. Any other method except just sending the key? And put the cursor at the end.
Reply With Quote
  #2  
Old 04-06-2023, 05:28 AM
Ddadoo57 Ddadoo57 is offline Go to end of document Windows 11 Go to end of document Office 2021
Advanced Beginner
 
Join Date: Feb 2023
Posts: 71
Ddadoo57 is on a distinguished road
Default

SendKeys "^{end}"

works fine, no ?
Reply With Quote
  #3  
Old 04-09-2023, 11:54 PM
Dimsok Dimsok is offline Go to end of document Windows XP Go to end of document Office 2007
Advanced Beginner
Go to end of document
 
Join Date: Sep 2014
Location: exUSSR
Posts: 50
Dimsok is on a distinguished road
Default

Sorry, it was my mistake. The first code is do the job.
Reply With Quote
Reply

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
Copy a selected range of a document to a new document with preserving formatting,header and footer RobertDany Word VBA 10 08-10-2021 04:04 AM
Code on a button to attach a document to my Word Auto fill document is not working on a Mac reynoldsrjr Word 0 03-30-2020 04:00 AM
Go to end of document USB disconnected while document was live; saved document now corrupt. How do I retrieve document? MaxB Word 2 07-01-2019 04:42 PM
Single step Word Styles from Source Document through entire Destination document? xbliss Word 6 08-27-2016 09:36 PM
Adding a link into a word document that when pressed, takes user to a page within the same document yan89 Word 1 04-29-2016 01:54 PM

Other Forums: Access Forums

All times are GMT -7. The time now is 04:06 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2024 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft