Link to home
Start Free TrialLog in
Avatar of toverholt
toverholt

asked on

MS Word Macro Picture Help

Folks:

I need to play two graphic files at the top of my page.  This is to create a letter head using a macro.  The transcription department transcribes medical records, and we want to stop printing on letterhead.  I would like the graphics to be part of the Header, since I cut and past the body frequently for other purposes.

I have a start, but I cannot get the two images to be far left and far right respectively.  I want the LOGO to be far left (Farther than the margin, and the second graphic LH2.bmp to be far right.  This is the address portion saved as a graphic.

The macro then puts some text at the bottom.  

I just need a little help.  High points for speed.

Troyo

Sub LH1()
'
' LH1 Macro
' Macro recorded 5/19/2009 by overhotl
'
    If ActiveWindow.View.SplitSpecial <> wdPaneNone Then
        ActiveWindow.Panes(2).Close
    End If
    If ActiveWindow.ActivePane.View.Type = wdNormalView Or ActiveWindow. _
        ActivePane.View.Type = wdOutlineView Then
        ActiveWindow.ActivePane.View.Type = wdPrintView
    End If
    ActiveWindow.ActivePane.View.SeekView = wdSeekCurrentPageHeader
    Selection.InlineShapes.AddPicture FileName:= _
        "C:\Documents and Settings\overhotl\My Documents\LH1LOGO.PNG", LinkToFile _
        :=False, SaveWithDocument:=True
        Selection.PageSetup.RightMargin = InchesToPoints(0.25)
    With Selection.ParagraphFormat
        .LeftIndent = InchesToPoints(-1.5)
        .SpaceBeforeAuto = False
        .SpaceAfterAuto = False
    End With
    
    Selection.InlineShapes.AddPicture FileName:= _
        "C:\Documents and Settings\overhotl\My Documents\LH2.BMP", LinkToFile _
        :=False, SaveWithDocument:=True
        Selection.PageSetup.RightMargin = InchesToPoints(0.25)
    With Selection.ParagraphFormat
        .LeftIndent = InchesToPoints(5.5)
        .SpaceBeforeAuto = False
        .SpaceAfterAuto = False
    End With
    'Selection.TypeText Text:="                    "
    If Selection.HeaderFooter.IsHeader = True Then
        ActiveWindow.ActivePane.View.SeekView = wdSeekCurrentPageFooter
    Else
        ActiveWindow.ActivePane.View.SeekView = wdSeekCurrentPageHeader
    End If
    Selection.TypeText Text:="Work Well Clinic" & vbTab & "Therapy Plus" & _
        vbTab & "Hearing Conservation"
    Selection.TypeParagraph
    Selection.TypeText Text:="(319) 369-8153" & vbTab & "(3190 369-8107" & _
        vbTab & "(319) 369-7569"
    Selection.MoveUp Unit:=wdLine, Count:=2, Extend:=wdExtend
    Selection.Font.Name = "Monotype Corsiva"
    Selection.Font.Size = 14
    ActiveWindow.ActivePane.View.SeekView = wdSeekMainDocument
End Sub

Open in new window

ASKER CERTIFIED SOLUTION
Avatar of GrahamSkan
GrahamSkan
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial