(I can't just delete all paragraph marks, because of multi-paragraph
footnotes.)
--
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
Graham Mayor - Word MVP
My web site www.gmayor.com
Word MVP web site http://word.mvps.org
(^13)(^13) Replace with \2 and Use Wildcards didn't do anything,
either.
On Nov 29, 9:47 am, "Graham Mayor" <gma...@REMOVETHISmvps.org> wrote:
> Try ^13 in place of ^p
>
> --
> <>>< ><<> ><<> <>>< ><<> <>>< <>><<>
> Graham Mayor - Word MVP
>
> My web sitewww.gmayor.com
> Word MVP web sitehttp://word.mvps.org
> <>>< ><<> ><<> <>>< ><<> <>>< <>><<>
>
>
>
> Peter T. Daniels wrote:
> > I've just received a ms. from an author who ended every one of
> > hundreds of footnotes with Enter, which results in what looks on
> > screen like a sequence of paragraph marks -- the Enter plus the
> > end-of- footnote mark -- but ^p^p doesn't find them.
>
> > (I can't just delete all paragraph marks, because of multi-paragraph
> > footnotes.)- Hide quoted text -
>
> - Show quoted text -
--
Suzanne S. Barnhill
Microsoft MVP (Word)
Words into Type
Fairhope, Alabama USA
http://word.mvps.org
"Peter T. Daniels" <gram...@verizon.net> wrote in message
news:796ffdab-1d1b-471a...@m20g2000vbp.googlegroups.com...
On Nov 29, 1:16 pm, "Suzanne S. Barnhill" <sbarnh...@mvps.org> wrote:
> Can you not replace with ^p?
>
> --
> Suzanne S. Barnhill
> Microsoft MVP (Word)
> Words into Type
> Fairhope, Alabama USAhttp://word.mvps.org
>
> "Peter T. Daniels" <gramma...@verizon.net> wrote in messagenews:796ffdab-1d1b-471a...@m20g2000vbp.googlegroups.com...
If all else fails (oh, joy!), you may have to copy the text of an existing
footnote (without the paragraph marks), delete the footnote reference in the
document body, insert a new footnote, and paste the copied content into it.
Lather. Rinse. Repeat.
--
Suzanne S. Barnhill
Microsoft MVP (Word)
Words into Type
Fairhope, Alabama USA
http://word.mvps.org
"Peter T. Daniels" <gram...@verizon.net> wrote in message
news:e3ab3c1b-3cd2-42a9...@n35g2000yqm.googlegroups.com...
Maybe authors should have to have graduate students type their papers
again, who know how to use these things.
On Nov 29, 3:20 pm, "Suzanne S. Barnhill" <sbarnh...@mvps.org> wrote:
> I guess I meant if you're not using wildcards (you don't have to be to use
> ^13). But Word can be extremely bloody-minded about paragraph marks
> sometimes--in footnotes, between tables, etc. While it may be possible to
> write a macro to take care of this (though ISTR that even a macro wouldn't
> do it for paragraph breaks between tables), in the long run you may just
> have to go through and do this by hand (using Delete or Backspace, whichever
> works).
>
> If all else fails (oh, joy!), you may have to copy the text of an existing
> footnote (without the paragraph marks), delete the footnote reference in the
> document body, insert a new footnote, and paste the copied content into it.
> Lather. Rinse. Repeat.
>
> --
> Suzanne S. Barnhill
> Microsoft MVP (Word)
> Words into Type
> Fairhope, Alabama USAhttp://word.mvps.org
>
> "Peter T. Daniels" <gramma...@verizon.net> wrote in messagenews:e3ab3c1b-3cd2-42a9...@n35g2000yqm.googlegroups.com...
> > > > footnotes.)--
--
Suzanne S. Barnhill
Microsoft MVP (Word)
Words into Type
Fairhope, Alabama USA
http://word.mvps.org
"Peter T. Daniels" <gram...@verizon.net> wrote in message
news:719f494e-087e-4a23...@d21g2000yqn.googlegroups.com...
You might be able to clean them up with the macro posted below. Very
limited testing (two section document with a few footnotes - each
footnote ended using the enter key once). If you decide to try this,
I suggest running it on a copy of the document first.
Sub ScratchMaco()
Dim oFN As Footnote
Dim i As Long
For Each oFN In ThisDocument.Footnotes
oFN.Range.Select
With Selection
.Collapse wdCollapseStart
.Expand Unit:=wdParagraph
.MoveStartUntil Cset:=vbCr
On Error Resume Next
.Delete
On Error GoTo 0
End With
'Add to clean up a spurious space added at the end of the footnotes as
they were processed.
If oFN.Index <> ThisDocument.Footnotes.Count Then
oFN.Range.Select
oFN.Range.Characters.Last = "@"
oFN.Range.Characters.Last.Delete
End If
Next
End Sub
> > > > > footnotes.)--- Hide quoted text -
On Nov 29, 7:30 pm, "Suzanne S. Barnhill" <sbarnh...@mvps.org> wrote:
> Hey, you've *seen* posts from graduate students in this NG. What makes you
> think they know how to use Word any better than their professors?
>
> --
> Suzanne S. Barnhill
> Microsoft MVP (Word)
> Words into Type
> Fairhope, Alabama USAhttp://word.mvps.org
>
> "Peter T. Daniels" <gramma...@verizon.net> wrote in messagenews:719f494e-087e-4a23...@d21g2000yqn.googlegroups.com...
> > > > > footnotes.)---
--
Suzanne S. Barnhill
Microsoft MVP (Word)
Words into Type
Fairhope, Alabama USA
http://word.mvps.org
"Peter T. Daniels" <gram...@verizon.net> wrote in message
news:e475216f-7ff6-4fa2...@1g2000vbm.googlegroups.com...
Try the following macro:
=============================
Sub RemoveEmptyParagraphsAtFootnoteEnd()
Dim note As Footnote
For Each note In ActiveDocument.Footnotes
note.Range.Select
Selection.Collapse wdCollapseEnd
Selection.MoveLeft Unit:=wdCharacter, Count:=1, Extend:=wdExtend
While (Selection.Text = vbCr)
Selection.Delete
Selection.MoveLeft Unit:=wdCharacter, Count:=1, Extend:=wdExtend
Wend
Next
End Sub
=============================
Yves
A simple search won't work due to the way a footnote is specified. Each
footnote has to reside in its own paragraph
"Peter T. Daniels" <gram...@verizon.net> wrote in message
news:00edb1fe-1661-4dfa...@j14g2000yqm.googlegroups.com...
That is probably my fault as I used "ThisDocument" vice "ActiveDocument" in
the code. You most likely placed the macro in a template before pinning it
to the QAT. Changing ThisDocument to ActiveDoucment should work (it does
here) but the code was clunky to begin with. Try this instead:
Sub ScratchMaco()
Dim oFN As Footnote
Dim i As Long
For Each oFN In ActiveDocument.Footnotes
On Error Resume Next
Do While Asc(oFN.Range.Characters.Last) = 13
oFN.Range.Characters.Last.Delete
On Error GoTo 0
Loop
Next
End Sub
<The end of footnote paragraph marker is not an ordinary paragraph marker.
It can not be removed. That probably explains why a simple
<find/replace doesn't work.
I think you are right. The behaviour of that little mark is certainly
interesting it throws a RTE 5252 if you try to delete it with VBA and it
can't even be deleted manually! That was what led to the On Error
statement in my two earlier versions. After seeing your version, I went
back to check and discovered that the mark itselt does not appear to be
physically part of the footnote range so there is no need for the error
handler or to manipulate the selection.
Sub ScratchMaco()
Dim oFN As Footnote
For Each oFN In ActiveDocument.Footnotes
Do While Asc(oFN.Range.Characters.Last) = 13
oFN.Range.Characters.Last.Delete
Loop
Next
End Sub
The macro did end up in the normal.dotm template; is there a way to
put a macro only into a document and not into any template at all?
Also, if I don't give it a button in the QAT, I don't know how to run
a macro. (*Word2007 Inside Out* indicates, p. 813, that doing it some
other way is clunky or inefficient anyway.)
On Nov 30, 8:07 am, "Greg Maxey"
> > "Peter T. Daniels" <gramma...@verizon.net> wrote in message
> >news:00edb1fe-1661-4dfa...@j14g2000yqm.googlegroups.com...
> >> I've just received a ms. from an author who ended every one of
> >> hundreds of footnotes with Enter, which results in what looks on
> >> screen like a sequence of paragraph marks -- the Enter plus the
> >> end-of- footnote mark -- but ^p^p doesn't find them.
>
> >> (I can't just delete all paragraph marks, because of multi-paragraph
> >> footnotes.)-
You can access macros from the Developer tab. If you hit the Macro button on
that tab, a list of available macros appear. You can use the "Run" button to
run any of those.
You can add the Macro button (View Macro) to your QAT. Or you can simply
press ALT+F8 (the default shortcut) to make the dialog appear.
Yves
"Peter T. Daniels" <gram...@verizon.net> wrote in message
news:d9e215bf-40c2-4ecc...@e20g2000vbb.googlegroups.com...
It also explains why it is not possible to have multiple footnotes on the
same line in Word. (I'm aware of the workaround using hidden text for the
'paragraph' marker.)
Yves
"Greg Maxey" <gma...@mIKEvICTORpAPAsIERRA.oSCARrOMEOgOLF> wrote in message
news:OhmRa4b...@TK2MSFTNGP05.phx.gbl...
Yves reference to paragraph marks is vbCr. vbCr is one of the miscellaneous
contants that the VB editor can using in place of the equivelent Chr(13).
Open your VB Editor (Alt+F11), highlight the intance of vbCr in Yves' code
and press F1. You should see the help file open with a listing of the
miscellaneous constants.
> The macro did end up in the normal.dotm template; is there a way to put a
> macro only into a document and not into any template at all?
Yes. With the document open, open the VB Editor. If not displayed, display
the Project Explorer (Ctrl+r). Expand the tree for the document project and
paste the code into the ThisDocument class module. When I was working of
the first edition, I was working in the VB Editor ThisDocument class module
and ran the macro by pressing the run command on the VBE toolbar (looks like
a play button on a DVD player). I do that a lot. That is why I neglected to
change ThisDocument to ActiveDocument before posting.
You can also run code using the Developer Tab>Code>Macros. Select the
appropriate document from the "Macros in" drop down. Select the macro and
press Run.
--
Suzanne S. Barnhill
Microsoft MVP (Word)
Words into Type
Fairhope, Alabama USA
http://word.mvps.org
"Peter T. Daniels" <gram...@verizon.net> wrote in message
news:d9e215bf-40c2-4ecc...@e20g2000vbb.googlegroups.com...
> It also explains why it is not possible to have multiple footnotes on the
> same line in Word. (I'm aware of the workaround using hidden text for the
> 'paragraph' marker.)
(But Word still leaves all the space that all the separate notes would
occupy, Suzanne has reported.)
It would be nice if that were fixed. In hot type books, it was very
usual to put two and three short reference footnotes on one line (a
column of such things under the left side of a text block looks quite
unbalanced). With large pages, it was quite common to have two columns
of footnotes under a single column of text -- that would be a nearly
adequate substitute for not being able to put several in one line.
Perhaps I should have indicated using the Macro dialog box isn't the most
efficient way to run macros you intend to use repeatedly. :-)
~Beth Melton
Microsoft Office MVP
"Peter T. Daniels" <gram...@verizon.net> wrote in message
news:d9e215bf-40c2-4ecc...@e20g2000vbb.googlegroups.com...
On Nov 30, 1:19 pm, "Beth Melton" <bmel...@NoSpam4Memvps.org> wrote:
> It states, "As you may have found in the previous section, using the Macro
> dialog box is not the most efficient way to run your macros. Ideally,
> running a macro should be as simple as clicking a button or pressing a
> keyboard shortcut."
>
> Perhaps I should have indicated using the Macro dialog box isn't the most
> efficient way to run macros you intend to use repeatedly. :-)
>
> ~Beth Melton
> Microsoft Office MVP
>
> "Peter T. Daniels" <gramma...@verizon.net> wrote in messagenews:d9e215bf-40c2-4ecc...@e20g2000vbb.googlegroups.com...
>
>
>
> > Also, if I don't give it a button in the QAT, I don't know how to run
> > a macro. (*Word2007 Inside Out* indicates, p. 813, that doing it some
> > other way is clunky or inefficient anyway.)-
~Beth Melton
Microsoft Office MVP
"Peter T. Daniels" <gram...@verizon.net> wrote in message
news:5f505743-9945-4f9b...@o13g2000vbl.googlegroups.com...