Results 1 to 2 of 2
  1. #1
    New Lounger
    Join Date
    Jan 2008
    Location
    Central Victoria, Victoria, Australia
    Posts
    18
    Thanks
    0
    Thanked 0 Times in 0 Posts
    I have created a template in Word 2003. When a user creates a new document based on this template I want the cursor to go to the bottom (Ctrl + End). Previously I used to create an autonew macro to do this. What can I do in Word 2003 (and 2007) that will take the user straight to the bottom automatically?

    Thanks.

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts
    A macro named AutoNew in a standard module will still work, but there is also another way to run a macro in a new document:
    - Open the template.
    - Activate the Visual Basic Editor.
    - In the Project Explorer on the left hand side, double-click the ThisDocument node of your template.
    - Select Document from the dropdown in the upper left corner of the module window that appears.
    - This will create an event procedure for the Document_New event.
    - Make it look like this:

    Code:
    Private Sub Document_New()
      Selection.EndKey Unit:=wdStory
    End Sub
    Note: if you use the new XML-based document format in Word 2007, make sure that you save the template as a macro-enabled template (.dotm), otherwise the VBA code will not be saved.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •