Thread: [Solved] position picture on page
View Single Post
 
Old 06-05-2021, 07:35 AM
Evening_Muffin Evening_Muffin is offline Windows 10 Office 2019
Novice
 
Join Date: Jun 2021
Location: Latvia
Posts: 5
Evening_Muffin is on a distinguished road
Default position picture on page

Why does only the second picture anchor is placed at the last paragraph on the page?
first picture is anchored at the top of the document (first paragraph)

Code:
Set doc = ActiveDocument
    Set Parag = doc.Paragraphs.Last
         

        Set shpShape = doc.Shapes.AddPicture( _
            FileName:=strFilename1, _
            Anchor:=Parag.Range)
   
        With shpShape
            .LockAspectRatio = msoTrue
            .WrapFormat.Type = wdWrapFront
            .Top = 20
            .Left = 350

        End With

        Set shpShape2 = doc.Shapes.AddPicture( _
            FileName:=strFileName2, _
            Anchor:=Parag.Range)
   

        With shpShape2
            .LockAspectRatio = msoTrue
            .WrapFormat.Type = wdWrapFront
            .Top = 30
            .Left = 250
        End With
Reply With Quote