Extracting a picture from an Image Control in a UserForm

Article contributed by Ibby

You can use the SavePicture statement to save the picture in an Image control to a file. You can only save the picture as a bitmap file using this method. The following example extracts the picture in the Image1 control to a file, then inserts the picture in the document.

SavePicture Image1.Picture, "C:/Test/Hello.bmp"

Selection.InlineShapes.AddPicture _
        FileName:="C:\Test\Hello.bmp", _
        LinkToFile:=False, _
        SaveWithDocument:=True


Click to view Terms of Use page

Click to view Disclaimer page