Below is my 1 space after macro, but I need to add 1 space after footnote -
I keep getting errors in my attempts:

.^f<space><space>
to be .^f<space>

a single space after footnote is that possible to do?

Sub Spaces_After()
Selection.Find.ClearFormatting
Selection.Find.Replacement.ClearFormatting
With Selection.Find
.Text = "([.\?\!]) {1,}"
.Replacement.Text = "\1 "
.Forward = True
.Wrap = wdFindContinue
.Format = False
.MatchWildcards = True
End With
Selection.Find.Execute Replace:=wdReplaceAll

Selection.HomeKey Unit:=wdStory
Selection.Find.ClearFormatting
Selection.Find.Replacement.ClearFormatting
With Selection.Find
.Text = " ^p"
.Replacement.Text = "^p"
.Forward = True
.Wrap = wdFindContinue
.Format = False
.MatchWholeWord = False
.MatchWildcards = False
End With
Selection.Find.Execute
While Selection.Find.Found
Selection.HomeKey Unit:=wdStory
Selection.Find.Execute Replace:=wdReplaceAll
Selection.Find.Execute
Wend

Selection.Find.Text = " ^l"
Selection.Find.Replacement.Text = "^l"
Selection.Find.Execute
While Selection.Find.Found
Selection.HomeKey Unit:=wdStory
Selection.Find.Execute Replace:=wdReplaceAll
Selection.Find.Execute
Wend
End Sub

Re: Spaces after 1 incorporate footnote by Helmut

Helmut
Mon Apr 07 08:15:11 PDT 2008

Hi Jen,

>Below is my 1 space after macro, but I need to add 1 space after footnote -
>I keep getting errors in my attempts:

at the end of your code,
run that macro.

Sub Scratchmacro()
Dim objFtn As Footnote
For Each objFtn In ActiveDocument.Footnotes
While objFtn.Range.Characters.Last = " "
objFtn.Range.Characters.Last = ""
Wend
objFtn.Range.Characters.Last.Next = " "
Next
End Sub

--

Greetings from Bavaria, Germany

Helmut Weber, MVP WordVBA

Vista Small Business, Office XP

Re: Spaces after 1 incorporate footnote by Helmut

Helmut
Mon Apr 07 08:38:01 PDT 2008

or do you want to delete several spaces after
the footnote character and have only one space instead?

If so:

Sub ScratchmacroC()
Dim objFtn As Footnote
For Each objFtn In ActiveDocument.Footnotes
While objFtn.Range.Characters.First = " "
objFtn.Range.Characters.First = ""
Wend
Next
End Sub

--

Greetings from Bavaria, Germany

Helmut Weber, MVP WordVBA

Vista Small Business, Office XP

Re: Spaces after 1 incorporate footnote by Jen

Jen
Thu Apr 10 00:15:34 PDT 2008

Helmut, help! I just noticed that the first macro 2 spaces to 1 doesn't do
the spaces in the footnotes themselves? Is there any way to do that to? All
storeys?

Sub Spaces_After()
Selection.Find.Clear
Selection.Find.Replacement.ClearFormatting
With Selection.Find
.Text = "([.\?\!]) {1,}"
.Replacement.Text = "\1 "
.Forward = True
.Wrap = wdFindContinue
.Format = False
.MatchWildcards = True
End With
Selection.Find.Execute Replace:=wdReplaceAll

Selection.HomeKey Unit:=wdStory
Selection.Find.ClearFormatting
Selection.Find.Replacement.ClearFormatting
With Selection.Find
.Text = " ^p"
.Replacement.Text = "^p"
.Forward = True
.Wrap = wdFindContinue
.Format = False
.MatchWholeWord = False
.MatchWildcards = False
End With
Selection.Find.Execute
While Selection.Find.Found
Selection.HomeKey Unit:=wdStory
Selection.Find.Execute Replace:=wdReplaceAll
Selection.Find.Execute
Wend

Selection.Find.Text = " ^l"
Selection.Find.Replacement.Text = "^l"
Selection.Find.Execute
While Selection.Find.Found
Selection.HomeKey Unit:=wdStory
Selection.Find.Execute Replace:=wdReplaceAll
Selection.Find.Execute
Wend
End Sub


Sub ScratchmacroC()
Dim objFtn As Footnote
For Each objFtn In ActiveDocument.Footnotes
While objFtn.Range.Characters.First = " "
objFtn.Range.Characters.First = ""
Wend
Next
End Sub
"Helmut Weber" <red.sys@t-online.de> wrote in message
news:rpfkv39avqqmalcl9sth7brglfqn4so33c@4ax.com...
> or do you want to delete several spaces after
> the footnote character and have only one space instead?
>
> If so:
>
> Sub ScratchmacroC()
> Dim objFtn As Footnote
> For Each objFtn In ActiveDocument.Footnotes
> While objFtn.Range.Characters.First = " "
> objFtn.Range.Characters.First = ""
> Wend
> Next
> End Sub
>
> --
>
> Greetings from Bavaria, Germany
>
> Helmut Weber, MVP WordVBA
>
> Vista Small Business, Office XP



Re: Spaces after 1 incorporate footnote by HelmutWeber

HelmutWeber
Thu Apr 10 04:42:00 PDT 2008

Hi Jen,

for spaces following a period, a question mark
or an exclamation mark in a footnote:

Sub Makro3x()
Dim rngFoot As Footnote
Dim rngTmp As Range
For Each rngFoot In ActiveDocument.Footnotes
Set rngTmp = rngFoot.Range
With rngTmp.Find
.Text = "([.\?\!]) {1,}"
.Replacement.Text = "\1 " ' note the space here
.MatchWildcards = True
.Execute Replace:=wdReplaceAll
End With
Next
End Sub

For spaces following the footnote character (the number),
see the macro "ScratchmacroC" I gave you.

--
Greetings from Bavaria, Germany
Helmut Weber, MVP WordVBA
Word 2002, Windows 2000 (german versions)


Re: Spaces after 1 incorporate footnote by Jen

Jen
Fri Apr 11 18:27:25 PDT 2008

Thank you Helmut

"Helmut Weber" <HelmutWeber@discussions.microsoft.com> wrote in message
news:41538347-A96B-47D0-B040-B7068392E785@microsoft.com...
> Hi Jen,
>
> for spaces following a period, a question mark
> or an exclamation mark in a footnote:
>
> Sub Makro3x()
> Dim rngFoot As Footnote
> Dim rngTmp As Range
> For Each rngFoot In ActiveDocument.Footnotes
> Set rngTmp = rngFoot.Range
> With rngTmp.Find
> .Text = "([.\?\!]) {1,}"
> .Replacement.Text = "\1 " ' note the space here
> .MatchWildcards = True
> .Execute Replace:=wdReplaceAll
> End With
> Next
> End Sub
>
> For spaces following the footnote character (the number),
> see the macro "ScratchmacroC" I gave you.
>
> --
> Greetings from Bavaria, Germany
> Helmut Weber, MVP WordVBA
> Word 2002, Windows 2000 (german versions)
>