access the tabstop character next to the footnote number (using VBA)

A

andreas

Dear Experts:

I tried to access (using VBA) the tabstop characters that are located
next to the footnote numbers of my document, but did not succeed. I am
using a hanging indent.

I would like to access (select) all the tabstop characters in my
footnotes and do the following action: range.font.reset.

Help is much appreciated. Thank you very much in advance.

Kind regards,

Andreas
 
S

Stefan Blom

To access the character following the footnote number (for the first
footnote), you can use this code:

Dim r As Range
Set r = ActiveDocument.Footnotes(1).Range.Paragraphs(1).Range.Characters(2)

Note that, by default, that character is a space, not a tab.

See also http://word.mvps.org/faqs/macrosvba/UnSuperscptFnotes.htm.

--
Stefan Blom
Microsoft Word MVP


in message
news:d4325879-ae84-4437-afda-9967db33de65@p25g2000hsf.googlegroups.com...
 
H

Helmut Weber

Hi Andreas,

try that one:

Sub Makro3a()
Dim rngFoot As Footnote
For Each rngFoot In ActiveDocument.Footnotes
If rngFoot.Range.Characters.First = Chr(9) Then
rngFoot.Range.Characters.First.Select ' for testing
rngFoot.Range.Characters.First.Font.Reset
End If
Next
End Sub
 
A

andreas

To access the character following the footnote number (for the first
footnote), you can use this code:

Dim r As Range
Set r = ActiveDocument.Footnotes(1).Range.Paragraphs(1).Range.Characters(2)

Note that, by default, that character is a space, not a tab.

See alsohttp://word.mvps.org/faqs/macrosvba/UnSuperscptFnotes.htm.

--
Stefan Blom
Microsoft Word MVP

in message










- Show quoted text -

Thank you so much. It worked. Regards, Andreas
 
A

andreas

Hi Andreas,

try that one:

Sub Makro3a()
Dim rngFoot As Footnote
For Each rngFoot In ActiveDocument.Footnotes
   If rngFoot.Range.Characters.First = Chr(9) Then
      rngFoot.Range.Characters.First.Select ' for testing
      rngFoot.Range.Characters.First.Font.Reset
   End If
Next
End Sub

Helmut, as always it is working just fine. Thank you so much. 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