Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 01-28-2013, 04:46 AM
Sharon Sharon is offline Macro to insert picture in footer Windows 7 32bit Macro to insert picture in footer Office 2010 32bit
Novice
Macro to insert picture in footer
 
Join Date: Jan 2013
Posts: 3
Sharon is on a distinguished road
Default Macro to insert picture in footer

Hi all

I have been (unsuccessfully) trying to create a macro that will insert a picture into a footer. I record the macro step by step and yet when I run it the picture is just inserted within the document not the footer.

I can just have it inserted on normal.dotm as it won't be used for every document.

I don't have any understanding of Visual Basic. Help please!

Thanks - Sharon

P.S.

This is what my macro recorded:

Sub eletterfooter()
'
' eletterfooter Macro
'
'
With Selection.PageSetup
.LineNumbering.Active = False
.Orientation = wdOrientPortrait


.TopMargin = CentimetersToPoints(1.27)
.BottomMargin = CentimetersToPoints(1.27)
.LeftMargin = CentimetersToPoints(1.27)
.RightMargin = CentimetersToPoints(1.27)
.Gutter = CentimetersToPoints(0)
.HeaderDistance = CentimetersToPoints(1.25)
.FooterDistance = CentimetersToPoints(1.25)
.PageWidth = CentimetersToPoints(21)
.PageHeight = CentimetersToPoints(29.7)
.FirstPageTray = wdPrinterDefaultBin
.OtherPagesTray = wdPrinterDefaultBin
.SectionStart = wdSectionNewPage
.OddAndEvenPagesHeaderFooter = False
.DifferentFirstPageHeaderFooter = False
.VerticalAlignment = wdAlignVerticalTop
.SuppressEndnotes = False
.MirrorMargins = False
.TwoPagesOnOne = False
.BookFoldPrinting = False
.BookFoldRevPrinting = False
.BookFoldPrintingSheets = 1
.GutterPos = wdGutterPosLeft
End With
Selection.TypeText Text:="this is the footer"
Selection.TypeParagraph
Selection.InlineShapes.AddPicture FileName:= _
"C:\Users\sharon\Desktop\case eletter\Footer.jpg", _
LinkToFile:=False, SaveWithDocument:=True
Selection.MoveLeft Unit:=wdCharacter, Count:=1
Selection.MoveUp Unit:=wdLine, Count:=1
Selection.MoveRight Unit:=wdWord, Count:=5, Extend:=wdExtend
Selection.Delete Unit:=wdCharacter, Count:=1
ActiveWindow.ActivePane.View.SeekView = wdSeekMainDocument
End Sub
Reply With Quote
 



Similar Threads
Thread Thread Starter Forum Replies Last Post
Macro to insert picture in footer Insert Picture changes colors rowan.bradley Drawing and Graphics 6 05-18-2013 05:26 PM
Macro to insert picture in footer insert picture file location gary1 Word 9 12-16-2012 04:37 PM
Macro to insert picture in footer Insert picture options, what's the difference? Jennifer Murphy Drawing and Graphics 3 10-09-2012 05:12 AM
Macro to insert picture in footer Macro for Picture Insert rfhall50 Word VBA 2 10-25-2010 12:41 PM
Macro to insert picture in footer Can I insert a picture into a picture ? alexcalgary Drawing and Graphics 2 10-16-2010 03:29 PM

Other Forums: Access Forums

All times are GMT -7. The time now is 01:18 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft