G
gan
Hi,
Please could someone show me how to load a jpg image
residing in a Word document into the VB6 PictureBox
control without lowering the image quality?
I tried this on a Word document with one inline JPG
picture.
Private Sub LoadWordPictureIntoPictureBox()
Dim WDoc as Word.Document
Dim WIShape As Word.InlineShape
Set WDoc = Word.Documents.Open("Doc with JPG.Doc")
'Reference the JPG image
Set WIShape = WDoc.InlineShapes(1)
'Copy image to clipboard
WIShape.Range.CopyAsPicture
'Put the picture in the VB PictureBox
Me.Picture1.Picture = Clipboard.GetData
End Sub
It works except that the VB PictureBox image quality is
rather poor compared to Word version. The VB PictureBox
works fine when I load the same image from file (.jpg).
Thanks in advance
Please could someone show me how to load a jpg image
residing in a Word document into the VB6 PictureBox
control without lowering the image quality?
I tried this on a Word document with one inline JPG
picture.
Private Sub LoadWordPictureIntoPictureBox()
Dim WDoc as Word.Document
Dim WIShape As Word.InlineShape
Set WDoc = Word.Documents.Open("Doc with JPG.Doc")
'Reference the JPG image
Set WIShape = WDoc.InlineShapes(1)
'Copy image to clipboard
WIShape.Range.CopyAsPicture
'Put the picture in the VB PictureBox
Me.Picture1.Picture = Clipboard.GetData
End Sub
It works except that the VB PictureBox image quality is
rather poor compared to Word version. The VB PictureBox
works fine when I load the same image from file (.jpg).
Thanks in advance