Telerik Forums
Telerik Document Processing Forum
3 answers
352 views

Hi,

I want to enumerate and modify mergefields manually in a table, because Telerik is currently not supported nested mail merge (ref: https://feedback.telerik.com/Project/184/Feedback/Details/190035-wordsprocessing-nested-mail-merge)

 

I found some code snippets similar to code below, but i can't find the FieldRangeStart type in the Word Processing Libraries for ASP.NET Ajax, seems it's works only WPF libraries? Isn't it?

 

foreach (FieldRangeStart fieldStart in document.EnumerateChildrenOfType<FieldRangeStart>())
{
    if (fieldStart.Field is MergeField)
    {
        mergeFields.Add(fieldStart);
    }
}

 

What do you suggest for enumerate and modify merge fields manually?

 

Tanya
Telerik team
 answered on 02 Mar 2017
1 answer
176 views

I am attempting to format the text, according to the attached example, and place keylines of different sizes.  Any help would be appreciated.

 

 

Dim document As New RadFlowDocument()
Dim editor As New RadFlowDocumentEditor(document)
 
'insert logo
editor.InsertBreak(BreakType.LineBreak)
Using fs As New FileStream(System.Web.HttpContext.Current.Server.MapPath("~/Assets/logo.png"), FileMode.Open, FileAccess.Read)
    editor.InsertImageInline(fs, "png")
End Using
editor.InsertBreak(BreakType.LineBreak)
editor.InsertBreak(BreakType.LineBreak)
editor.InsertBreak(BreakType.LineBreak)
 
 
editor.InsertLine("Application Name")
editor.InsertLine("Application ID")
editor.InsertLine("Status")
editor.InsertLine("Deadline Date")
Dinko | Tech Support Engineer
Telerik team
 answered on 28 Feb 2017
1 answer
224 views

Hello,

Is there a way to read/update document custom properties?

Say I have a document that has fields inserted into the text (with DOCPROPERTY) that are pointing to a custom document property. I would like to open the document, update the custom document properties and then do an update of all fields (I found I can trigger the update thru UpdateFields method or when Exporting by setting the appropriate flag).

I have not found any mention in the documentation about how I would be able to update an existing document custom property. Could someone point me in the right direction?

Thank you

Tanya
Telerik team
 answered on 24 Feb 2017
6 answers
119 views

Hello,

i have trouble reading small numbers from xlsx-files by using the spread processing components. in the attached file you can see an example. column A contains the values i want to read  which are computed from row 2 to row 8. the used formula can be seen in column B. column C contains the values that the spread processing is able to read using

 

workbook.Worksheets[0].Cells[4,0].GetValue().Value.GetResultValueAsString(CellValueFormat.GeneralFormat)

 

i'm able to read small numbers that aren't computed by using 

 

workbook.Worksheets[0].Cells[4,0].GetValue().Value.RawValue

 

what is the proper way to read the computed result values?

Dinko | Tech Support Engineer
Telerik team
 answered on 17 Feb 2017
1 answer
132 views

I'm having a problem reading values from a cell when a certain user is pasting into the spreadsheet and keeping the existing formatting.  When I target the cell and use the GetValue() method I get no result.  When I tore apart the spreadsheet I see that the expected value "Blah Blah Blah" is wrapped in a RichTextRun.  Is there another way that I can drill into the details of this cell to get this value?

<si>
        <r>
            <rPr>
                <sz val="8"/>
                <rFont val="Arial"/>
                <family val="34"/>
            </rPr><t>Blah Blah Blah</t>
        </r>
    </si>

Deyan
Telerik team
 answered on 14 Feb 2017
1 answer
357 views
I need to document generation insert special characters (CHECKBOX True / False), please could someone direct me to the correct procedure?

well thank you
Tanya
Telerik team
 answered on 10 Feb 2017
1 answer
147 views

Hi Guys,

I finally race through a quite exciting one; WordsProcessing capabilities of Telerik UI for ASP.NET AJAX.

After a couple of reading, I try now to :

  1. Upload a word document pre-formatted that will be used for mail merge: OK!
  2. Access central DB to retrieve dataset: OK!
  3. Download the resulting Word docx file: OK!
  4. Opening to check if everything went fine: OK!
  5. Checking inline formatting: FAILED!

Well, not at all but partially failed. I lost my header picture (but I may need to dig deeper into this question) and, most important, I lost my tab stops defined by paragraph in the MS-Word file where I have the MERGE field, why does it happened? If I open again the initial document (let call it the source) in MS-Word, I can see the tab stops and everything looks fine. Do I miss a special setup?

Have you gone through the same issue? If yes, can you point me in the good direction to fix this? Thank you for your help.

Best Regards,
David

Martin Ivanov
Telerik team
 answered on 06 Feb 2017
5 answers
181 views

Hi,

 

I wanted to ask if it is possible to rotate the text of a cell. See the screenshot for an example.

 

Best regards,

Philipp

Tanya
Telerik team
 answered on 25 Jan 2017
1 answer
152 views

Hi,

Is it possible to configure the printing as for the library RadSpreadProcessing ?

Thank you

'Print configuration
Dim pageSetup As Printing.WorksheetPageSetup = excSheet.WorksheetPageSetup
pageSetup.PaperType = Telerik.Windows.Documents.Model.PaperTypes.A4
pageSetup.PageOrientation = Telerik.Windows.Documents.Model.PageOrientation.Landscape
Dim HeadFootSettings As Printing.HeaderFooterSettings = pageSetup.HeaderFooterSettings
HeadFootSettings.Header.CenterSection.Text = excSheet.Name
HeadFootSettings.Footer.CenterSection.Text = DateTime.Now.ToString
Martin Ivanov
Telerik team
 answered on 17 Jan 2017
1 answer
197 views

Hello,

i have an issue with WordsProcessing. After i have replaced text, borders from tables disappear.

 

Public Function SetVorblatt() As String
       Dim cmsObj As New CsCms
       Dim dateiName As String = Titel.Replace(":", "").Replace("/", "").Replace("\", "").Replace("""", "")
       Dim containsAlleMa As Boolean = False
       Dim flowDocument As Telerik.Windows.Documents.Flow.Model.RadFlowDocument
       Dim docxProvider As New Telerik.Windows.Documents.Flow.FormatProviders.Docx.DocxFormatProvider
       Dim floDocEditor As Telerik.Windows.Documents.Flow.Model.Editing.RadFlowDocumentEditor
       Dim formulardaten As List(Of FormularData) = GetFormData()
       'Änderung vom 12.12.2016
       'Umstellung vom RTF auf DOCX
       'Änderung vom 02.09.2015
       'Prüfung, ob bei den Adressatenkreis "alle Mitarbeiter" ausgewählt wurde. Falls nicht, soll die Checkbos "wie folgend" befüllt werden
 
       Try
 
           If IsNothing(formulardaten) = False Then
               Using input As New FileStream(AppSettings("serverMappath") & "\anwendungen\zav\formulare\RL-Vorlage_.docx", FileMode.Open)
                   flowDocument = docxProvider.Import(input)
               End Using
 
               floDocEditor = New Telerik.Windows.Documents.Flow.Model.Editing.RadFlowDocumentEditor(flowDocument)
 
               For Each formData As FormularData In formulardaten
                   floDocEditor.ReplaceText(formData.Text, formData.Value & " ")
                   Logger.Trace(formData.Text & " :" & formData.Value)
               Next
 
               Using output As New FileStream(AppSettings("serverMappath") & "\anwendungen\sfo\vorblatt\" & dateiName & ".docx", FileMode.Create)
                   docxProvider.Export(flowDocument, output)
               End Using
 
               dateiName = AppSettings("serverMappath") & "\anwendungen\sfo\vorblatt\" & dateiName & ".docx"
           End If
 
       Catch ex As Exception
           Dim var As String = "Vorblatt wurde nicht erzeugt. dateiName:" & dateiName
           Logger.Error(var, ex)
       End Try
       Return dateiName
   End Function

 

You can see it at the attachements. Have anyone an idea what i have made wrong?

Best regards

Jens

Mihail
Telerik team
 answered on 16 Jan 2017
Narrow your results
Selected tags
Tags
+? more
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?