Is there a VBA command for "delete to the end of this document"?
Thanks.

Re: Delete to end-of-file? by Tony

Tony
Mon Oct 24 14:35:06 CDT 2005

Not, AFAIK, an explicit single command but this should do it:

Selection.EndKey Unit:=wdStory, Extend:=wdExtend
Selection.Delete

--
Enjoy,
Tony


"Rick Charnes" <rickxyz--nospam.zyxcharnes@thehartford.com> wrote in message
news:MPG.1dc6f3ec979b9f35989903@msnews.microsoft.com...
> Is there a VBA command for "delete to the end of this document"?
> Thanks.



Re: Delete to end-of-file? by Anne

Anne
Mon Oct 24 14:33:56 CDT 2005

I recorded this, Rick:
Selection.EndKey Unit:=wdStory, Extend:=wdExtend
Selection.Delete Unit:=wdCharacter, Count:=1

There's probably a more eloquent way of doing it.
************
Anne Troy
www.OfficeArticles.com

"Rick Charnes" <rickxyz--nospam.zyxcharnes@thehartford.com> wrote in message
news:MPG.1dc6f3ec979b9f35989903@msnews.microsoft.com...
> Is there a VBA command for "delete to the end of this document"?
> Thanks.



Re: Delete to end-of-file? by Doug

Doug
Mon Oct 24 14:38:20 CDT 2005

Dim myrange as Range
Set myrange=Selection.Range
myrange.End = ActiveDocument.Range.End
myrange.Delete

--
Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.

Doug Robbins - Word MVP

"Rick Charnes" <rickxyz--nospam.zyxcharnes@thehartford.com> wrote in message
news:MPG.1dc6f3ec979b9f35989903@msnews.microsoft.com...
> Is there a VBA command for "delete to the end of this document"?
> Thanks.