hi all....my code is below...i want to be able to change a certain word in my document to another but it fails to change the text in the text box at the top of my page....any help please Selection.Find.ClearFormatting Selection.Find.Replacement.ClearFormatting With Selection.Find .Text = "firm name" .Replacement.Text = "new firm name" .Forward = True .Wrap = wdFindContinue .Format = False .MatchCase = False .MatchWholeWord = False .MatchWildcards = False .MatchSoundsLike = False .MatchAllWordForms = False End With Selection.Find.Execute Replace:=wdReplaceAll If ActiveWindow.View.SplitSpecial <> wdPaneNone Then ActiveWindow.Panes(2).Close End If If ActiveWindow.ActivePane.View.Type = wdNormalView Or ActiveWindow. _ ActivePane.View.Type = wdOutlineView Then ActiveWindow.ActivePane.View.Type = wdPrintView End If ActiveWindow.ActivePane.View.SeekView = wdSeekCurrentPageHeader Selection.MoveDown Unit:=wdScreen, Count:=4 With ActiveDocument.Styles(wdStyleNormal).Font If .NameFarEast = .NameAscii Then .NameAscii = "" End If .NameFarEast = "" End With With ActiveDocument.PageSetup .LineNumbering.Active = False .Orientation = wdOrientPortrait .TopMargin = CentimetersToPoints(2.54) .BottomMargin = CentimetersToPoints(4) .LeftMargin = CentimetersToPoints(2) .RightMargin = CentimetersToPoints(2) .Gutter = CentimetersToPoints(0) .HeaderDistance = CentimetersToPoints(1.25) .FooterDistance = CentimetersToPoints(0.4) .PageWidth = CentimetersToPoints(21) .PageHeight = CentimetersToPoints(29.7) .FirstPageTray = wdPrinterDefaultBin .OtherPagesTray = wdPrinterDefaultBin .SectionStart = wdSectionNewPage .OddAndEvenPagesHeaderFooter = False .DifferentFirstPageHeaderFooter = True .VerticalAlignment = wdAlignVerticalTop .SuppressEndnotes = False .MirrorMargins = False .TwoPagesOnOne = False .BookFoldPrinting = False .BookFoldRevPrinting = False .BookFoldPrintingSheets = 1 .GutterPos = wdGutterPosLeft .SectionDirection = wdSectionDirectionLtr End With Selection.WholeStory Selection.Delete Unit:=wdCharacter, Count:=1 Application.DisplayAutoCompleteTips = True NormalTemplate.AutoTextEntries("SFooter.TXT").Insert Where:=Selection.Range _ , RichText:=True 'Selection.TypeBackspace ActiveWindow.ActivePane.View.SeekView = wdSeekMainDocument 'PrinterNow = ActivePrinter 'Gets current printer 'vIsALetterPrinter = True 'This IS a Letter printer 'vLetterPrinter = "\\LFDATA1\HPC4-1" 'Sets the letter printer name 'vCopyPrinter = "\\LFDATA1\HPC4-1" 'Sets the copy printer ' 'frmPrinting.Show 'Displays print dialog box 'Call DoSelectPrinter 'Selects the correct printer 'Call DoPageSetup4345 'Selects the correct bins 'Call DoPrinting4345 'Prints the document (& copy if required) 'Call DoSaving 'Saves if required 'If PrinterNow <> ActivePrinter Then ' ActivePrinter = PrinterNow 'Sets default printer back to original 'End If End Sub
Hi Matthew, see: http://gregmaxey.mvps.org/VBA_Find_And_Replace.htm http://word.mvps.org/faqs/customization/replaceanywherecontent.htm -- Greetings from Bavaria, Germany Helmut Weber, MVP WordVBA Win XP, Office 2003 "red.sys" & Chr$(64) & "t-online.de"