#1
|
|||
|
|||
Copy and Paste a certain Page
Hey everyone,
I’m currently trying to program a command button so that after you have clicked on it, a certain page of your document will be copied and gets paste on a certain page of the document. Currently my code looks something like this: Private Sub CommandButton1_Click() Dim Select As String Select = InputBox("Which Page do you want to duplicate?", "Copy Page") If Selection = vbNullString Then Exit Sub Dim pRange As Range Selection.GoTo What:=wdGoToPage, Which:=wdGoToNext, Name:=Select Set pRange = ActiveDocument.Bookmarks("\Page").Range pRange.Copy ActiveDocument.Characters.Last.Select Selection.Collapse Selection.Paste End Sub This Code pastes the copied page on the last page which I have to insert before. What I want is that I can paste the page wherever I want (an upcoming massage Box would be good that asks me where I want to put it). My Word Document has about 26 pages if that is necessary to know. Is there also a possibility to copy and paste the makros that are on the page together with their functions? You see, I’m completely new here, so hopefully you can help me! Regards, Dominik |
#2
|
|||
|
|||
A couple of thoughts:
What is it you are trying to accomplish by copying and pasting pages? |
Tags |
comman button |
Thread Tools | |
Display Modes | |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Page Up & Copy/Paste Issues | weamish | Word | 10 | 02-01-2014 08:25 PM |
Copy Paste each cell to a new page | Singh_Edm | Word | 12 | 01-20-2014 12:55 AM |
Paste Special: Copy and Paste Formatting Only? | tinfanide | Word | 6 | 03-06-2013 12:21 AM |
Copy and paste words on right side of page | Videolife | Word | 3 | 01-26-2013 12:54 PM |
Find, copy and paste into a new page | jperez84 | Word VBA | 24 | 09-20-2012 11:34 AM |