What constitutes a 'line' in this context. A line is a transient thing the
length of which depends on a number of factors. How are you determining what
is on the 'line' that you wish to delete?

Signature
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
Graham Mayor - Word MVP
My web site www.gmayor.com
Word MVP web site http://word.mvps.org
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
> I want to assign "delete line" for MS Word to the F12 key. How can I
> do this?
Graham, thanks so much. Example: the second line of your post below, a
line of text ("...length of which...").
When I'm composing in MS Word, I would like to use the F12 key to delete a
line of text immediately below the line I am working on. I guess an easier
way of describing this is I want to "suck up" unwanted text by entire line of
text, not just a character.
Does this make sense? Sorry, I'm not technically-vocabularized.
Thanks again for reading/responding to my post.
Cherri
> What constitutes a 'line' in this context. A line is a transient thing the
> length of which depends on a number of factors. How are you determining what
> is on the 'line' that you wish to delete?
>
> > I want to assign "delete line" for MS Word to the F12 key. How can I
> > do this?
Helmut Weber - 17 Sep 2006 19:21 GMT
Hi Cherri,
a million ways to delete the next line,
and a million complications.
This is just a working solution.
Handle with care!
Sub DeleteNextLine()
Dim rTmp As Range
' remember the selection
Set rTmp = selection.Range
With selection
.GoTo _
what:=wdGoToLine, _
which:=wdGoToNext, _
Count:=1
.Bookmarks("\line").Range.Delete
End With
'restore the selection
rTmp.Select
End Sub
Hoping, assigning a shortcut to it would not be a problem.

Signature
Greetings from Bavaria, Germany
Helmut Weber, MVP WordVBA
Win XP, Office 2003
"red.sys" & Chr$(64) & "t-online.de"
Cherri - 17 Sep 2006 21:16 GMT
Helmut,
Willhandle wth care. thanks.
(although wish there were a simpler way to do this....:)
> Hi Cherri,
>
[quoted text clipped - 20 lines]
>
> Hoping, assigning a shortcut to it would not be a problem.
Helmut Weber - 18 Sep 2006 15:50 GMT
Hi Cherri;
>(although wish there were a simpler way to do this....:)
it is even more complicated,
as my code deletes the actual line,
if there is no next line. :-(
HTH, nevertheless

Signature
Greetings from Bavaria, Germany
Helmut Weber, MVP WordVBA
Win XP, Office 2003
"red.sys" & Chr$(64) & "t-online.de"