Word Header Image and Text Issues


I am opening a Word 2010 document, filling in selected bookmarks, saving as RTF and then opening this document to export to PDF and have the following issues:

  • The RTF document does not contain an image that is embedded in the source DOCX document.
  • The PDF document does not contain header and footer text that appear in the DOCX and RTF documents.
  • Is there a code example of inserting an image into a location in the document defined by a bookmark?  The following code nearly works perfectly but it requires an extra carriage return after the bookmark otherwise the image appears after the text on the following line:

[code lang='vb']

Dim myDocument As New ComponentPro.Word.WordDocument

Dim myBookmarks As ComponentPro.Word.BookmarksNavigator

myDocument.OpenReadOnly("Path+File", WordDocumentFormat.Automatic)

myBookmarks = New ComponentPro.Word.BookmarksNavigator(myDocument)


Dim myParagraph As ComponentPro.Word.Paragraph = myBookmark.BookmarkStart.OwnerParagraph

Dim signatureImage As Image = System.Drawing.Image.FromFile("Path+File")

Dim myPicture As ComponentPro.Word.Picture

myPicture = myParagraph.AppendPicture(signatureImage)



edited 12/2/2017 11:03:16 PM
asked 5/15/2013 9:11:42 AM
add a comment

0 Answers

Your Answer

Not the answer you're looking for? Browse other questions tagged word or ask your own question.