Results 1 to 2 of 2
  1. #1
    New Lounger
    Join Date
    Oct 2013
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    replacing pictures in the footer of a doc file

    Hi,

    I am trying to make a code, which replaces a jpg file in the footer of a word document.
    This is how I started it, but it doesn't work.
    Could anybody work?

    many thanks
    Code:
    Sub Demo()
    Dim DocSrc As Document, DocTgt As Document, HdFt As HeaderFooter
    Dim sSec As Section
    
    Set DocSrc = Documents.Open(FileName:="H:\footers\docFrom.docx", Visible:=True, AddTorecentFiles:=False)
    Set DocTgt = Documents.Open(FileName:="H:\footers\sample.docx", Visible:=True, AddTorecentFiles:=False)
    
    DocSrc.Sections(1).Footers(wdHeaderFooterPrimary).Range.Select
    
    Set DocSrc = Nothing: Set DocTgt = Nothing
    End Sub

  2. Get our unique weekly Newsletter with tips and techniques, how to's and critical updates on Windows 7, Windows 8, Windows XP, Firefox, Internet Explorer, Google, etc. Join our 480,000 subscribers!

    Excel 2013: The Missing Manual

    + Get this BONUS — free!

    Get the most of Excel! Learn about new features, basics of creating a new spreadsheet and using the infamous Ribbon in the first chapter of Excel 2013: The Missing Manual - Subscribe and download Chapter 1 for free!

  3. #2
    Super Moderator
    Join Date
    May 2002
    Location
    Canberra, Australian Capital Territory, Australia
    Posts
    3,899
    Thanks
    0
    Thanked 188 Times in 172 Posts
    Cross-posted (and solved) at: http://www.msofficeforums.com/word-v...directory.html
    For cross-posting etiquette, please read: http://www.excelguru.ca/content.php?184
    Cheers,

    Paul Edstein
    [MS MVP - Word]

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •