Forum Home
Press F1
 
Thread ID: 122444 2011-12-21 15:56:00 VB runtime error in word 2007 5941 ansipants (16667) Press F1
Post ID Timestamp Content User
1249944 2011-12-21 15:56:00 New to macros and I ' m having an issue getting the macro to run. Any help is greatly appreciated. I get a 5941 error: here is the code:

Sub Macro1()
'
' Macro1 Macro
'
'
Selection.GoTo What:=wdGoToPage, Which:=wdGoToFirst, Count:=2, Name:=""
Selection.Find.ClearFormatting
With Selection.Find
.Text = ""
.Replacement.Text = ""
.Forward = True
.Wrap = wdFindContinue
.Format = False
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
WordBasic.ViewFooterOnly
Selection.HeaderFooter.LinkToPrevious = Not Selection.HeaderFooter. _
LinkToPrevious
With Selection.HeaderFooter.PageNumbers
.NumberStyle = wdPageNumberStyleLowercaseRoman
.HeadingLevelForChapter = 0
.IncludeChapterNumber = False
.ChapterPageSeparator = wdSeparatorHyphen
.RestartNumberingAtSection = True
.StartingNumber = 1
End With
Selection.ParagraphFormat.Alignment = wdAlignParagraphCenter
ActiveDocument.AttachedTemplate.BuildingBlockEntri es("Plain Number"). _
Insert Where:=Selection.Range, RichText:=True
ActiveWindow.ActivePane.View.SeekView = wdSeekMainDocumentEnd Sub


the red is where im recieving the error.
ansipants (16667)
1249945 2011-12-21 16:12:00 there is no space between the i and the e in entries. that was a typo ansipants (16667)
1