How to Load Microsoft word content including boarder around header text and style into a radrichtextbox windows ui

1 Answer 101 Views
Styling
obi
Top achievements
Rank 1
obi asked on 02 Jul 2021, 10:56 AM | edited on 02 Jul 2021, 03:24 PM

Please how to Load Microsoft word content including boarder around header text and style into a radrichtextbox. I tried loading from a folder to radrichtextbox. It loads but removes the boarder around header text and does not maintain line spacing. I want it to maintain exactly what I have in the word document. Below is my attempt which loaded but did not adapt header text border style and linespace. After loading the attached file to RadRichTextBox it does not display the double boarder around the text in the header.

 Dim provider2 As DocxFormatProvider = New DocxFormatProvider()
            Using inputStream As FileStream = File.OpenRead(My.Computer.FileSystem.SpecialDirectories.MyDocuments & "\duk\Dictionary" & txtDirCount.Text & ".docx")
                Me.RadRichTextEditor1.Document = provider2.Import(inputStream)
            End Using
            Dim provider As TxtFormatProvider = New TxtFormatProvider()

            RadRichTextEditor1.LayoutMode = DocumentLayoutMode.Paged
            'Dim sectionColumnCollection As SectionColumnCollection = New SectionColumnCollection(2, 30, False) 'Without line in the middle
            Dim sectionColumnCollection As New Telerik.WinForms.Documents.Model.SectionColumnCollection(2, 75, True) ' With line in the middle
            Dim editor As RadDocumentEditor = New RadDocumentEditor(RadRichTextEditor1.Document)
            editor.ChangeSectionColumns(sectionColumnCollection)
            Dim header As New Header()

Peshito
Telerik team
commented on 02 Jul 2021, 01:48 PM

Hi Obi,

It does not become clear what might be causing this behavior from the code above. In order to be able to provide you with appropriate information on the matter, please provide the test document or a running demo reproducing the issue. You can do this by submitting a support ticket and attaching the files or use a third-party website for sharing files.

Regards,
Peshito
Progress Telerik

obi
Top achievements
Rank 1
commented on 02 Jul 2021, 03:21 PM | edited

After loading the attached file to RadRichTextBox it does not display the double boarder around the text in the header including line spacing.
obi
Top achievements
Rank 1
commented on 02 Jul 2021, 04:18 PM

I have modified the question above, sorry I posted it here as answer.

1 Answer, 1 is accepted

Sort by
0
Peshito
Telerik team
answered on 05 Jul 2021, 01:03 PM

Hello Obi,

Thank you for the document attached. I was able to reproduce the issue. It is caused by a feature that is not yet implemented in RadRichTextbox control - Page/Paragraph borders. You can subscribe for the item to get notified by email when its status changes. There is a workaround in the feature request that you could use depending on your scenario. 

Regards,
Peshito
Progress Telerik
Tags
Styling
Asked by
obi
Top achievements
Rank 1
Answers by
Peshito
Telerik team
Share this question
or