Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 07-16-2014, 10:54 PM
Syed_Farid Syed_Farid is offline Delete Page Windows 7 64bit Delete Page Office 2013
Novice
Delete Page
 
Join Date: Jul 2014
Posts: 1
Syed_Farid is on a distinguished road
Default Delete Page

While entering this code, I am getting the error bellow: Please help

Dim Rng As Range, iPage As Long
iPage = 2
With ActiveDocument
Set Rng = .GoTo(What:=wdGoToPage, Name:=iPage)
Set Rng = Rng.GoTo(What:=wdGoToBookmark, Name:="\page")


Rng.Delete
End With


Error: Wrong number of argument or invalid property assignment .
Reply With Quote
  #2  
Old 07-17-2014, 12:40 AM
macropod's Avatar
macropod macropod is offline Delete Page Windows 7 32bit Delete Page Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 21,963
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

The code works fine for me.

PS: When posting code, please use the code tags. They're on the 'Go Advanced' tab at the bottom of this screen.

Please also don't resurrect old threads - start a new one. The one in which you posted was already inactive for over 2 years when you posted. Splitting your post & this reply off to a new thread.
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
Reply



Similar Threads
Thread Thread Starter Forum Replies Last Post
Delete Page Delete a page after Section Break Next Page Aston Word 9 04-27-2022 07:38 AM
I can't delete my page numbers mj2000 Word 1 02-15-2014 12:34 PM
Delete Page delete page break seeker62 Word 3 07-22-2013 06:49 PM
Delete Page Can't Delete bottom page bad_dog81 Word 1 07-08-2011 02:54 AM
How do you delete a blank page at end? aerophil Word 4 10-24-2009 05:04 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 04:58 PM.


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