Macro to work on picture

G

Geetha Naidu

Hi i need to record macro which inserts an image(From file) in to the image
control. How do i go about doing this
 
K

Kyle.Zhang

Hello Geetha
you can try this

Dim sFile As String
Dim myDialog As Dialog
Set myDialog = Dialogs(wdDialogInsertPicture)

With myDialog
.Display
sFile = .Name
End With

Image1.Picture = Nothing
Image1.Picture = LoadPicture(sFile)
Image1.AutoSize = True
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top