This question is locked. New answers and comments are not allowed.
Hi,
I am trying to import export a document type docx using RichTextBox. My document have tables and Macro check box. When I import using IDocumentFormatProvider and set the layoutMode to FlowNoWrap, the document looks right but all the macro is gone.
Import code:
IDocumentFormatProvider provider = DocumentFormatProvidersManager.GetProviderByExtension(extension);
using (Stream stream = openDialog.OpenFile())
{
RadDocument document = provider.Import(stream);
document.LayoutMode = DocumentLayoutMode.FlowNoWrap;
radRtbEditor.Document = document;
}
When I export the document from RichTextBox using DocxFormatProvider, all the tables is shrinked to a smaller size (about 1/4 of the document).
Export Code:
DocxFormatProvider provider = new DocxFormatProvider();
using (Stream output = saveDialog.OpenFile())
{
RadDocument docToExport = radRtbEditor.Document;
provider.Export(docToExport, output);
}
Could you please tell me if I am missing anything from the code or if this is an known issue of the richTextbox?
Thanks
I am trying to import export a document type docx using RichTextBox. My document have tables and Macro check box. When I import using IDocumentFormatProvider and set the layoutMode to FlowNoWrap, the document looks right but all the macro is gone.
Import code:
IDocumentFormatProvider provider = DocumentFormatProvidersManager.GetProviderByExtension(extension);
using (Stream stream = openDialog.OpenFile())
{
RadDocument document = provider.Import(stream);
document.LayoutMode = DocumentLayoutMode.FlowNoWrap;
radRtbEditor.Document = document;
}
When I export the document from RichTextBox using DocxFormatProvider, all the tables is shrinked to a smaller size (about 1/4 of the document).
Export Code:
DocxFormatProvider provider = new DocxFormatProvider();
using (Stream output = saveDialog.OpenFile())
{
RadDocument docToExport = radRtbEditor.Document;
provider.Export(docToExport, output);
}
Could you please tell me if I am missing anything from the code or if this is an known issue of the richTextbox?
Thanks