Hey, thanks Dave.
Unfortuneately that deleted the entire contents of the document!
Would that be because there is only one section in the document, which
starts near the end?
I'm using a section just as a device to identify the part of the document
beyong which I want to delete.
Is there a similar syntax for deleting the last page? I could use a page
break instead of a section break.
Yes, it deletes the contents of the document if you only have one section. If
what you're really looking for is delete the LAST page, then you can use the
following:
Selection.EndKey Unit:=wdStory, Extend:=wdMove
ActiveDocument.Bookmarks("\Page").Range.Delete
This will leave and empty paragraph mark on the last page.
To remove it, add this to the end of the routine
Selection.TypeBackspace
HTH,
Dave
> Hey, thanks Dave.
>
[quoted text clipped - 42 lines]
> > >
> > > Help would be appreciated.
Grant Ord - 02 Feb 2006 10:08 GMT
Dave
Thanks very much for your help here.
That's worked just as you said.
> Yes, it deletes the contents of the document if you only have one section. If
> what you're really looking for is delete the LAST page, then you can use the
[quoted text clipped - 56 lines]
> > > >
> > > > Help would be appreciated.