Inserting a full stop (period) at the end of each footnote should onebe missing.

A

andreas

Dear Experts,

I wonder whether it is possible to insert a full stop at the end of
each footnote should a full stop be missing. If there is already a
full stop in place, the code should skip that footnote.

I tried to write the macro myself but kept getting error messages.

Your valuable help is much appreciated.

Regards, Andreas
 
D

Doug Robbins - Word MVP

Use the following:

Dim afn As Footnote
For Each afn In ActiveDocument.Footnotes
If afn.Range.Characters(afn.Range.Characters.Count) <> "." Then
afn.Range.InsertAfter "."
End If
Next afn


--
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
 
S

Stefan Blom

For existing footnotes, you should be able to use this macro:

Sub InsertFullStopAfterFnNumber()
Dim f As Footnote
For Each f In ActiveDocument.Footnotes
f.Range.Paragraphs(1).Range.Characters(2).Text = ". "

Next f
End Sub

The macro replaces the first character following the footnote number with a
full stop and a space.

--
Stefan Blom
Microsoft Word MVP


in message
news:54ad6fa5-ec35-4ebb-8c92-c4fbbcffb733@c33g2000hsd.googlegroups.com...
 
S

Stefan Blom

Hmm, I assumed that the period should be after the footnote number. If it
should be added at the very end of the footnote text, Doug's macro is the
way to do it.

--
Stefan Blom
Microsoft Word MVP


in message
 
A

andreas

Use the following:

Dim afn As Footnote
For Each afn In ActiveDocument.Footnotes
    If afn.Range.Characters(afn.Range.Characters.Count) <> "." Then
        afn.Range.InsertAfter "."
    End If
Next afn

--
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










- Zitierten Text anzeigen -

Doug,

thank you very much. Nice coding, it works as desired. Terrific Help.
Regards, Andreas
 
A

andreas

Hmm, I assumed that the period should be after the footnote number. If it
should be added at the very end of the footnote text, Doug's macro is the
way to do it.

--
Stefan Blom
Microsoft Word MVP

in message









- Zitierten Text anzeigen -

Stefan,

you are right. It should be added at the very end of the footnotes.
Doug's macor is running just fine. But thank you very much anyway for
your speedy response.
Regards, Andreas
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top