I replace {PHOTO} in a document using this code:
Dim paragraph As WParagraph = New WParagraph(doc)
Dim pictureW As WPicture
Dim textBodyPart As TextBodyPart = New TextBodyPart(doc)
pictureW = CType(paragraph.AppendPicture(b, WPicture)
textBodyPart.BodyItems.Add(paragraph)
doc.Replace("{PHOTO}", textBodyPart, False, False)
The problem is need to solve is that when {PHOTO} is inside a Textbox, the photo needs to resize to fit the Textbox.
How can I do this?