I'm a bit new at this and I'm having problems mail merging into MS Word an image from a SQL Server table. This article.
I set a bookmark in Word as the placeholder for the image (unsure if this is best way).
Problem is the image is displaying in Word, but it is way too large.
Is there a way to resize the image before it gets to Word?
Here is my code:
Dim r As DataRow
r = dtLicence(0)
Dim MyPhoto As Object
MyPhoto = r("Photo")
myImage = MyPhoto
Dim membits As New MemoryStream(myImage)
Dim WordPhoto As Image
WordPhoto = Image.FromStream(membits)
Clipboard.SetDataObject(WordPhoto)
word_server.Selection.GoTo( _
What:=Word.WdGoToItem.wdGoToBookmark, _
Name:="Photo")
With word_server.Selection
.Paste()
End With
If anyone could provide some code sample for me to try I would appreciate it.