![]() |
#1
|
|||
|
|||
![]()
I have a script in DOORS that creates a document with a table. However, for some reason, it always adds 2 empty pages before the actual content. I have been trying to write a simple script that will delete these first 2 pages, but it's not working. Here's the code I'm using:
Code:
Sub removeExtraPages() 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 End Sub I found this code from this forum, but can't seem to figure out what is causing the problem. I'm hoping someone can help me out. Chris |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
![]() |
Dimsok | Word VBA | 18 | 11-14-2014 12:30 PM |
![]() |
thauser | Word | 3 | 05-27-2014 01:56 AM |
![]() |
jolinchew | Excel | 4 | 08-01-2013 06:09 AM |
![]() |
Microsoftenquirer1000 | Word | 14 | 08-27-2012 01:24 PM |
hidden blank pages | mljm | Word | 3 | 06-19-2009 03:18 AM |