Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Word / Programming / February 2007

Tip: Looking for answers? Try searching our database.

MsgBox showing all multiline-footnotes that erroneously have a carriage return at the end of lines

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
andreas - 22 Feb 2007 13:11 GMT
Can I tell Word via VBA to show me all the footnotes that erroneously
have a carriage return at the end of multi-line footnotes. ?
To be more specific there are still people who press enter at the end
of a written line instead of let Word do the line break
automatically.

The MsgBox should say for example:

Footnote 1: carriage return, page 7
Footnote 2: carriage return, page 9
etc.

Could  please somebody give me a hint ? Thank you very much in
advance.

Regards,

Andreas
Helmut Weber - 22 Feb 2007 14:27 GMT
Hi Andreas,

like this:

Sub Macro4()
Dim strA As String
Dim strB As String
Dim oFtn As Footnote
For Each oFtn In ActiveDocument.Footnotes
  If InStr(oFtn.Range.Text, Chr(13)) > 0 Then
     strA = CStr(oFtn.index)
     strA = "Footnote " & strA & " on page "
     strB = oFtn.Range.Information(wdActiveEndPageNumber)
     MsgBox strA & strB
  End If
Next
End Sub

How to build the string that the messagebox shows,
is a matter of taste and style.

HTH

Signature

Greetings from Bavaria, Germany

Helmut Weber, MVP WordVBA

Win XP, Office 2003
"red.sys" & Chr$(64) & "t-online.de"

 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.