We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Force text formatting on document clone

Thread ID:





49442 Sep 19,2006 08:16 AM UTC Sep 19,2006 08:46 PM UTC WinForms 1
Tags: DocIO
Richard Bacon
Asked On September 19, 2006 08:16 AM UTC

Using the sub: -


Sub renderitem(ByVal doc As IWordDocument, ByVal sData As String, ByVal iSection As Integer, ByVal bBreak As Boolean)
Dim HTMLdocument As WordDocument = New WordDocument()
Dim convertor As HTMLToDLS = New HTMLToDLS()
convertor.Convert(HTMLdocument, sData)
If bBreak Then
HTMLdocument.Sections(0).BreakCode = SectionBreakCode.NewPage
End If
'' Create MemoryStream for storing the document.
Dim mem As MemoryStream = New MemoryStream()
'' Save document to stream.
HTMLdocument.Save(mem, FormatType.Doc)
'' Sets the position to the Stream.
mem.Seek(0, SeekOrigin.Begin)
'' get pos of background for proposal
Dim bgsection As IWSection = doc.Sections(iSection)
Dim secs As IWSectionCollection = HTMLdocument.Sections
For Each sec As IWSection In secs
'' Enumerating all the paragraphs in the current section.
Dim paragraphs As IWParagraphCollection = sec.Paragraphs
'' Cloning all the paragraphs from current section and merge it into the new document.
For Each paragraph As IWParagraph In paragraphs
''What?.CharacterFormat.fontname() = "Verdanna"
''What?.CharacterFormat.fontsize = 10
Next paragraph
Next sec
End Sub


It it possible to force the output to be verdanna 10pt? (where I have "what?" remmed out)

Thanks in advance. If this can be sorted, then I think this product will do everything we need (until further notice ;) )

Administrator [Syncfusion]
Replied On September 19, 2006 08:46 PM UTC

Hi Richard,

Thank you for your interest in Essential DocIO.

Yes, it is possible to force the document paragraphs output to the particular paragraph style like setting the font name as verdana, size as 10pt, etc. I have created a small sample to illustrate this functionality. Please take a look at the attached sample and let me know if it meets your need.




This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

or the page will be automatically redirected to sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon