Results 1 to 3 of 3
  1. #1
    2 Star Lounger
    Join Date
    Oct 2004
    Minnesota, USA
    Thanked 0 Times in 0 Posts

    Copying a Range In Word (Office 2003)

    I'm rusty in working with Word. 99% of my time is spent in Excel and Access, and now I've been asked to do a Word document.

    Is there a way to copy part of a document programmatically in Word?

    My users have a format set up with several tables to document field reviews of customers (two tables at the top and one table at the bottom of the page). They review several customers in the same Word document.

    The first page of the document is the template. They want to be able to copy that first page, go to the end of the first page and insert a break, then paste that template on the new page after the break.

    Inserting the break is easy with a bookmark after the footer table. Now, I'm having trouble getting Word to allow me to copy just the first page. Can you name a range in Word like you can in Excel?

    Any suggestions would be appreciated.

    Thanks in advance for your help.


  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Thanked 28 Times in 28 Posts

    Re: Copying a Range In Word (Office 2003)

    Yes, Word does have a range object too. Type Range in the Visual Basic Editor and press F1 to get online help.

    A "page" is not a very natural object to Word, since repagination is automatic. You can use the predefined "page" bookmark to get hold of the current page. Here is how to copy the first page to the clipboard:

    Selection.HomeKey Unit:=wdStory

  3. #3
    Super Moderator jscher2000's Avatar
    Join Date
    Feb 2001
    Silicon Valley, USA
    Thanked 93 Times in 89 Posts

    Re: Copying a Range In Word (Office 2003)

    You also could save the "template" paragraphs as AutoText with a name such as NewTable. After inserting a page break, they could type newt until the name is recognized, and then press F3 to insert the AutoText entry. This assumes that the document they are creating remains associated with the original template, or that you add the AutoText entry to a global template that is always available on the users' computers. Unlike a macro, an AutoText entry cannot be stored in the document itself.

    (AutoText entries also can be inserted using a macro. There are many code samples here in the Lounge if you choose to go that way {Example: <post#=349993>post 349993</post#>}. Remember to set RichText:=True.)

Posting Permissions

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