Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
![]()
I have a macro that cleans up documents (non-breaking spaces, etc.) and I'm
trying to get it to look for footnotes and clean them up but if no footnotes just clean the document text. FOOTNOTESCAN changes the view to Normal, selects View Footnote then cleans them up and returns to page 1 of the document and then runs CLEAN macro to clean the text. CLEAN just cleans the text and doesn't look for footnotes. Each macro runs fine by itself but I can't connect them to run in one macro. In LOOKFOR below I've tried having it look for the footnote mark in the text and then run the other macros. No luck. If I run FOOTNOTESCAN in a document that has no footnotes, it doesn't work and I get an error msg. LOOKFOR macro only cleans the text and ignores FOOTNOTESCAN. Sub FootnoteScan() ' ' FootnoteScan Macro ' Macro recorded 2/5/2009 by VL_Jackson ' If ActiveWindow.View.SplitSpecial = wdPaneNone Then ActiveWindow.ActivePane.View.Type = wdPrintView Else ActiveWindow.View.Type = wdNormalView End If If ActiveWindow.ActivePane.View.Type = wdPrintView Or ActiveWindow. _ ActivePane.View.Type = wdWebView Or ActiveWindow.ActivePane.View.Type = _ wdPrintPreview Then ActiveWindow.View.SeekView = wdSeekFootnotes Else ActiveWindow.View.SplitSpecial = wdPaneFootnotes End If If ActiveWindow.View.SeekView = wdPaneFootnotes Then Application.Run MacroName:="CLEAN" Else ActiveWindow.ActivePane.View.Type = wdPrintView End If Call GOTOPAGE End Sub LOOKFOR Selection.Find.ClearFormatting With Selection.Find .Text = "^f" .Forward = True .Wrap = wdFindContinue .Format = False .MatchCase = False .MatchWholeWord = False .MatchWildcards = False .MatchSoundsLike = False .MatchAllWordForms = False If Text = "^f" Then Call FootnoteScan Else Call CLEAN End If End With End Sub -- Ginny |
Thread Tools | |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
If statements | Mailmerge | |||
quotations within IF statements? | Microsoft Word Help | |||
If then statements | Mailmerge | |||
IF statements with footers | Mailmerge | |||
IF Fields With AND Statements | Microsoft Word Help |