This is a migrated thread and some comments may be shown as answers.

Print/Preview Merged Document

2 Answers 43 Views
RichTextEditor
This is a migrated thread and some comments may be shown as answers.
Lee
Top achievements
Rank 1
Lee asked on 25 Feb 2015, 05:37 PM
Hi,
I'm trying to print/preview the complete results from a merge - the code below only outputs the currently selected merge record. I can scroll thru all merged records on screen but not print or preview the "whole" document. Dim provider As IDocumentFormatProvider = New DocxFormatProvider()
                Dim openDialog As New OpenFileDialog()
                openDialog.InitialDirectory = Session.WorkFolder & "\letters"
                'openDialog.Filter = "Documents|*.docx"
                openDialog.Multiselect = False
                Dim dialogResult As DialogResult = openDialog.ShowDialog()
                If dialogResult = System.Windows.Forms.DialogResult.OK Then

                    Using stream As Stream = openDialog.OpenFile()
                        RichTextEditor.Document = provider.Import(stream)
                    End Using

                    RichTextEditor.Document.MailMergeDataSource.ItemsSource = WkLetters
                    RichTextEditor.UpdateAllFields(FieldDisplayMode.Result)
                    RichTextEditor.MailMerge(True)

RichTextEditor.PrintPreview

                End If



Any help would be greatly appreciated.

Regards,

Lee.

2 Answers, 1 is accepted

Sort by
0
Lee
Top achievements
Rank 1
answered on 27 Feb 2015, 09:29 AM
Have sorted this thanks.
0
Stefan
Telerik team
answered on 02 Mar 2015, 10:46 AM
Hello Lee,

I am glad you have solved this case on your own. 

We will really appreciate it if you can provide more details on what precisely was the issue you had and how you resolved it, so our community can benefit from this thread.

Thank you in advance.

Regards,
Stefan
Telerik
 

Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

 
Tags
RichTextEditor
Asked by
Lee
Top achievements
Rank 1
Answers by
Lee
Top achievements
Rank 1
Stefan
Telerik team
Share this question
or