Solved

Macro to copy line 1 - 8 page 1 to line 1 page 2....

Posted on 2011-03-01
1
434 Views
Last Modified: 2012-05-11
I want to create a macro in Word 2007 that will go to page 1 line 1 and copy line 1 - 8
Then paste to line 1 of page 2.

I would like to create this in VB instead of using the recording so the content doesn't matter only the lines and the page.
0
Comment
Question by:TKCONSTRUCTORS
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 
LVL 76

Accepted Solution

by:
GrahamSkan earned 50 total points
ID: 35009309
Is this what you need?
Sub CopyToPageTwo()
    Dim rng As Range
    
    With ActiveDocument
        Set rng = .Content
        rng.End = .Paragraphs(8).Range.End
        rng.Copy
        Set rng = .Range.GoTo(wdGoToPage, 2)
        rng.Paste
    End With
End Sub

Open in new window

0

Featured Post

On Demand Webinar - Networking for the Cloud Era

This webinar discusses:
-Common barriers companies experience when moving to the cloud
-How SD-WAN changes the way we look at networks
-Best practices customers should employ moving forward with cloud migration
-What happens behind the scenes of SteelConnect’s one-click button

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Do you ever need to create a 20 page Word document for some testing purpose? Are you tired of copying & pasting old boring "lorem ipsum" text over and over again, increasing font size and line space in order to make the document 20+ pages long? Look…
Nice table. Huge mess. Maybe this was something you created way back before you figured out tabs or a document you received from someone else. Either way, using the spacebar to separate the columns resulted in a mess. Trying to convert text to t…
This video teaches the viewer how to align pictures around text while keeping the text properly aligned in the document.
In a previous video Micro Tutorial here at Experts Exchange (http://www.experts-exchange.com/videos/1358/How-to-get-a-free-trial-of-Office-365-with-the-Office-2016-desktop-applications.html), I explained how to get a free, one-month trial of Office …

617 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question