Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 06-01-2016, 11:25 PM
DomiS DomiS is offline Copy and Paste a certain Page Windows 7 64bit Copy and Paste a certain Page Office 2010 64bit
Novice
Copy and Paste a certain Page
 
Join Date: Apr 2016
Posts: 1
DomiS is on a distinguished road
Exclamation 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
Reply With Quote
 

Tags
comman button



Similar Threads
Thread Thread Starter Forum Replies Last Post
Page Up & Copy/Paste Issues weamish Word 10 02-01-2014 08:25 PM
Copy and Paste a certain Page Copy Paste each cell to a new page Singh_Edm Word 12 01-20-2014 12:55 AM
Copy and Paste a certain Page 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
Copy and Paste a certain Page Find, copy and paste into a new page jperez84 Word VBA 24 09-20-2012 11:34 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 03:31 PM.


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