Is there a VBA command for "delete to the end of this document"? Thanks.
R Rick Charnes Oct 24, 2005 #1 Is there a VBA command for "delete to the end of this document"? Thanks.
A Anne Troy Oct 24, 2005 #2 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
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
T Tony Jollans Oct 24, 2005 #3 Not, AFAIK, an explicit single command but this should do it: Selection.EndKey Unit:=wdStory, Extend:=wdExtend Selection.Delete
Not, AFAIK, an explicit single command but this should do it: Selection.EndKey Unit:=wdStory, Extend:=wdExtend Selection.Delete
D Doug Robbins - Word MVP Oct 24, 2005 #4 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
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