Good evening hope this is the right forum for this type of quesiton...
I have a letterhead template with a different first page than the subsequent pages. I have attempted to automate my letterhead, so I can add it after I have completed the verbiage from a blank document via a macro.
When I use the macro, it only reapeats the first page letterhead over and over instead of switching over to the subsequent pages that are already in the template I built.
When I use a macro I built to remove the letterhead from a document I created from within the original "letterhead" template only the first page deletes and all subsequent pages keep the second page formatting (trying to make it blank).
I followed everything as laid out in the site below, but feel that I am missing something.
http://pubs.logicalexpressions.com/Pub0009/LPMArticle.asp?ID=528a
--- CODE For MACRO I have recorded is below ---
******INSERT LOGO******
Sub InsertLogo()
'
' InsertLogo Macro
' Macro recorded 10/17/2007 by angeli
'
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
Application.DisplayAutoCompleteTips = True
With AutoCorrect
.CorrectInitialCaps = True
.CorrectSentenceCaps = True
.CorrectDays = True
.CorrectCapsLock = True
.ReplaceText = True
.ReplaceTextFromSpellingChecker = True
.CorrectKeyboardSetting = False
.DisplayAutoCorrectOptions = True
.CorrectTableCells = True
End With
ActiveDocument.AttachedTemplate.AutoTextEntries("Logo").Insert Where:= _
Selection.Range, RichText:=True
Application.DisplayAutoCompleteTips = True
With AutoCorrect
.CorrectInitialCaps = True
.CorrectSentenceCaps = True
.CorrectDays = True
.CorrectCapsLock = True
.ReplaceText = True
.ReplaceTextFromSpellingChecker = True
.CorrectKeyboardSetting = False
.DisplayAutoCorrectOptions = True
.CorrectTableCells = True
End With
ActiveDocument.AttachedTemplate.AutoTextEntries("LogoBar").Insert Where:= _
Selection.Range, RichText:=True
If Selection.HeaderFooter.IsHeader = True Then
ActiveWindow.ActivePane.View.SeekView = wdSeekCurrentPageFooter
Else
ActiveWindow.ActivePane.View.SeekView = wdSeekCurrentPageHeader
End If
Application.DisplayAutoCompleteTips = True
With AutoCorrect
.CorrectInitialCaps = True
.CorrectSentenceCaps = True
.CorrectDays = True
.CorrectCapsLock = True
.ReplaceText = True
.ReplaceTextFromSpellingChecker = True
.CorrectKeyboardSetting = False
.DisplayAutoCorrectOptions = True
.CorrectTableCells = True
End With
ActiveDocument.AttachedTemplate.AutoTextEntries("LogoFooter").Insert Where _
:=Selection.Range, RichText:=True
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
End Sub
******REMOVAL OF LOGO******
Sub RemoveLogo()
'
' RemoveLogo Macro
' Macro recorded 10/17/2007 by angeli
'
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.WholeStory
Selection.Delete Unit:=wdCharacter, Count:=1
If Selection.HeaderFooter.IsHeader = True Then
ActiveWindow.ActivePane.View.SeekView = wdSeekCurrentPageFooter
Else
ActiveWindow.ActivePane.View.SeekView = wdSeekCurrentPageHeader
End If
Selection.WholeStory
Selection.Delete Unit:=wdCharacter, Count:=1
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
End Sub
Astrid - 15 Nov 2007 02:34 GMT
Hi Ted,
I don't understand you exactly:
- are you using this macro inside a document that has a different first page
header defined?
- does the logo show on all pages but the first (if so, on what page is the
cursor if you start the macro?)
I can't open the URL you provided, what exactly does your macro need to do,
add the logo to only the first page?
> Good evening hope this is the right forum for this type of quesiton...
>
[quoted text clipped - 115 lines]
> ActiveWindow.ActivePane.View.SeekView = wdSeekCurrentPageHeader
> End Sub
Russ - 15 Nov 2007 18:39 GMT
This is the link Ted meant to post:
http://pubs.logicalexpressions.com/Pub0009/LPMArticle.asp?ID=528
> Hi Ted,
>
[quoted text clipped - 136 lines]
>> ActiveWindow.ActivePane.View.SeekView = wdSeekCurrentPageHeader
>> End Sub

Signature
Russ
drsmN0SPAMikleAThotmailD0Tcom.INVALID