A macro do MS Word desenvolvida no Windows 7 parou de funcionar na máquina XP [fechada]

1
Sub test(imagePath As String)
    Dim kl As Shape
    Dim rng As Range
    Set rng = ActiveDocument.Bookmarks("bkmk1").Range

    Set kl = ActiveDocument.Shapes.AddPicture(FileName:=imagePath, LinkToFile:=False, SaveWithDocument:=True, Width:=35, Height:=35)
    kl.RelativeHorizontalPosition = wdRelativeHorizontalPositionPage
    kl.RelativeVerticalPosition = wdRelativeVerticalPositionPage
    kl.Left = rng.Information(wdHorizontalPositionRelativeToPage)
    kl.Top = rng.Information(wdVerticalPositionRelativeToPage)
End Sub

Esta macro parou de posicionar a imagem corretamente em uma máquina Windows XP com o Office 2010. Como posso corrigir isso?

    
por user2122034 24.06.2013 / 10:31

0 respostas