Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
925
WordDocumentWriter not available
posted

I am trying to use the WordDocumentWriter.  I am struggling to understand why the control is not available .  How can I add the reference.  I see it as if it is added, but I can not see the control in my Toolbox..

 

Imports Infragistics.Win.UltraWinGrid
Imports Infragistics.Win.Layout
Imports Infragistics.Win.UltraWinGrid.WordWriter
Imports System.Text.RegularExpressions
Imports Infragistics.Documents.Excel
Imports Infragistics.Documents.IO '' This gives an green line error
.
.
Dim wordDocWriter As WordDocumentWriter = WordDocumentWriter.Create("C:\Samples_Projects\GridDataInWord.docx")
wordDocWriter.StartDocument()
wordDocWriter.StartParagraph()
Dim font As Infragistics.Documents.Word.Font = wordDocWriter.CreateFont()
font.Bold = True
font.Underline = Underline.Thick
font.ForeColor = Color.Red

 

Parents
  • 21795
    Offline posted

    Hello Marius,

    You are on the right way of using WordDocumentWriter. Please note WordDocumentWriter is an abstract class in Infragistics WinForms library and it is not a control or component. This is why you cannot see is in your toolbox. More about WordDocumentWriter you can find by following next link http://help.infragistics.com/Doc/WinForms/current/CLR4.0/?page=Word_About_Infragistics_Word_Library.html

    Please note WordDocumentWriter is abstract class and does not support direct instantiation. To create an instance of a derived class you need to use Create method. One more point – each time you start document or paragraph by StartDocument() or StartParagraph() methods when you finish with them you need to call EndParagraph() and EndDocument() in order to avoid an exception.

    This row Imports Infragistics.Documents.IO gives you an error as Infragistics.Documents.IO library does not contains any public methods.

    Please find attached a sample solution implementing MS Word document creation via WordDocumentWriter.

    Please let me know in this is what you are looking for or if I am missing something.

    Thank you for contacting Infragistics.

    CAS-144987-K4J9N4.zip
Reply Children