J
jm7sa
Hello - help gratefully received!
I am trying to write a simple macro for MS Word (I'm using 2007 bu
would like it to work for 2003 too ideally)
The macro should:
1. insert a website address and company details into the footer of th
first page of a document and then
2. insert a logo into the footer of all subsequent pages.
I'm a bit of a newbie and I've tried to record a macro to do this bu
it puts everything into the first footer.
I have searched through these forums and come up with a macro that let
me place text into the first page only - but I can't then add th
alternative footer for subsequent pages.
Here's my macro (apologies in advance....)
Sub footer()
'
' footer Macro
'
'
ActiveDocument.PageSetup.DifferentFirstPageHeaderFooter = True
WordBasic.ViewFooterOnly
Selection.Font.Size = 8
Selection.ParagraphFormat.Alignment = wdAlignParagraphRight
Selection.TypeText Text:= _
"MY WEBSITE ADDRESS AND COMPANY DETAILS"
If ActiveWindow.View.SplitSpecial = wdPaneNone Then
ActiveWindow.ActivePane.View.Type = wdPrintView
Else
ActiveWindow.View.Type = wdPrintView
WordBasic.ViewFooterOnly
Selection.InlineShapes.AddPicture FileName:= _
"C:\images\mylogo.jpg", _
LinkToFile:=False, SaveWithDocument:=True
End If
End Su
I am trying to write a simple macro for MS Word (I'm using 2007 bu
would like it to work for 2003 too ideally)
The macro should:
1. insert a website address and company details into the footer of th
first page of a document and then
2. insert a logo into the footer of all subsequent pages.
I'm a bit of a newbie and I've tried to record a macro to do this bu
it puts everything into the first footer.
I have searched through these forums and come up with a macro that let
me place text into the first page only - but I can't then add th
alternative footer for subsequent pages.
Here's my macro (apologies in advance....)
Sub footer()
'
' footer Macro
'
'
ActiveDocument.PageSetup.DifferentFirstPageHeaderFooter = True
WordBasic.ViewFooterOnly
Selection.Font.Size = 8
Selection.ParagraphFormat.Alignment = wdAlignParagraphRight
Selection.TypeText Text:= _
"MY WEBSITE ADDRESS AND COMPANY DETAILS"
If ActiveWindow.View.SplitSpecial = wdPaneNone Then
ActiveWindow.ActivePane.View.Type = wdPrintView
Else
ActiveWindow.View.Type = wdPrintView
WordBasic.ViewFooterOnly
Selection.InlineShapes.AddPicture FileName:= _
"C:\images\mylogo.jpg", _
LinkToFile:=False, SaveWithDocument:=True
End If
End Su