![]() |
#1
|
|||
|
|||
![]()
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 |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
![]() |
rowan.bradley | Drawing and Graphics | 6 | 05-18-2013 05:26 PM |
![]() |
gary1 | Word | 9 | 12-16-2012 04:37 PM |
![]() |
Jennifer Murphy | Drawing and Graphics | 3 | 10-09-2012 05:12 AM |
![]() |
rfhall50 | Word VBA | 2 | 10-25-2010 12:41 PM |
![]() |
alexcalgary | Drawing and Graphics | 2 | 10-16-2010 03:29 PM |