Word Header Image and Text Issues with .NET third-party Library RRS feed

  • Question

  • Hi guys, Im new here. I tried to use this third party Library and struggling with it. I am opening a Word 2010 document, filling in selected bookmarks, saving as RTF with ComponentPro Word Library 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:
    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)

    Thursday, August 1, 2019 3:22 AM

All replies

  • Hi Donald Patrick,

    Thank you for posting here.

    For your question, ComponentPro Word Library is a third-party library for which we don't provide help.

    I suggest you ask your question in ComponentPro forums for better help.

    The CLR Forum discuss and ask questions about .NET Framework Base Classes (BCL) such as Collections, I/O, Regigistry, Globalization, Reflection. Also discuss all the other Microsoft libraries that are built on or extend the .NET Framework.

    Thank you for your understanding.

    Best Regards,

    Xingyu Zhao

    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Friday, August 2, 2019 1:44 AM