Results 1 to 2 of 2
  1. #1
    New Lounger alexpereira's Avatar
    Join Date
    Aug 2003
    Location
    Washington, District Of Columbia, USA
    Posts
    15
    Thanks
    1
    Thanked 0 Times in 0 Posts
    I have run a macro for years that would put the firm logo in the header/footer of a letter created in Word.
    Now they have changed the logo location from the center of the page to the left side where I already have header info as text.

    I have " reserved" space on the left margin for the logo by moving the header text a bit to the right of the left margin. Now I need to set the firm logo picture to be "behind text", so it does not dislocate my text when I put the picture in through the macro. What command line do I use to accomplish this?
    I run the macro in Word 2003 and Word 2007.

    The following is the code used to drop the picture in place:

    ..... ******************
    Selection.InlineShapes.AddPicture FileName:= _
    "W:\Templates\My Templates\hd-01.tif", LinkToFile:= _
    False, SaveWithDocument:=True
    Selection.MoveLeft Unit:=wdCharacter, Count:=1, Extend:=wdExtend
    Selection.InlineShapes(1).Fill.Visible = msoFalse
    Selection.InlineShapes(1).Fill.Transparency = 0#
    Selection.InlineShapes(1).Line.Weight = 0.75
    Selection.InlineShapes(1).Line.Transparency = 0#
    Selection.InlineShapes(1).Line.Visible = msoFalse
    Selection.InlineShapes(1).LockAspectRatio = msoTrue
    Selection.InlineShapes(1).PictureFormat.Brightness = 0.5
    Selection.InlineShapes(1).PictureFormat.Contrast = 0.5
    Selection.InlineShapes(1).PictureFormat.ColorType = msoPictureAutomatic
    Selection.InlineShapes(1).PictureFormat.CropLeft = 0#
    Selection.InlineShapes(1).PictureFormat.CropRight = 0#
    Selection.InlineShapes(1).PictureFormat.CropTop = 0#
    Selection.InlineShapes(1).PictureFormat.CropBottom = 0#

    ...****************************
    Thanks for the help..

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts
    Try this:

    Selection.InlineShapes.AddPicture FileName:= ...
    Selection.MoveLeft Unit:=wdCharacter, Count:=1, Extend:=wdExtend
    Selection.InlineShapes(1).ConvertToShape
    Selection.HeaderFooter.Shapes(1).ZOrder msoSendBehindText

Posting Permissions

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