Footnote checkspelling vba

S

sopasla

I try to check the spelling of a footnote through vba in MS word.
The code is pretty much simple:

Dim fn as Footnote

set fn = ActiveDocument.footnotes.items(0)
fn.Range.checkSpelling

I made a clear mistake in my footnote. However, when I run this code,
MS Word doesn't detect any misspelling error.

When I run it with the Word interface (Tools/Check grammar and
spelling), it finding the mistake.


So is there anybody who knows how to check the footnote spelling
through vba?

Thanks
 
S

Stefan Blom

Word collections have no zero item; the first item is number 1. Try this
code instead:

Dim fn As Footnote

Set fn = ActiveDocument.Footnotes(1)
fn.Range.CheckSpelling
 

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