Beiträge von Koob

    Hello,

    We are using WPCubed Textdynamic .Net component to edit rtf documents. We use Word to print te documents (after doing some self-made merging) as rtf.
    We would like to print the first page of the document on paper with a pre-printed header on it, and the next pages on blanco paper.
    If we use word to create a document (as word .doc file), then we can organise this, and save this inside the document.
    Is this posible with the wpcubed component (when editing rtf)?

    Currently we are using version 1.72. When needed, upgrading to a newer version is an option.

    Thanks,
    Koob

    Hello,
    I am using version 1.50.0 of the TextDynamic editor control. In it I defined several mergefields. Now I want to enumerate all fields, but one of them (<6>) is skipped. Am I missing something, or is it a (know) bug?

    Thanks,
    Jaap

    The code I use to enumerate:

    Private Sub WalkMergeFields(ByVal subToExecute As WPDynamic.WPDLLInt.EnumTextObjEvent, ByVal eventParam As Integer)
    AddHandler WP.OnEnumTextObjEvent, subToExecute
    Try
    WP.Memo.EnumTextObj(TextObjTypes.wpobjMergeField, False, "", eventParam)
    Finally
    RemoveHandler WP.OnEnumTextObjEvent, subToExecute
    End Try
    End Sub

    Here is the full contents of the WP.Text property before calling EnumTextObj. As I see it, the skipped <6> is not different than the others..

    {\rtf1\ansi\deff0\uc1\ansicpg1252\deftab720{\fonttbl{\f0\fnil\fcharset1 Arial;}{\f1\fnil\fcharset2 Wingdings;}}{\colortbl\red0\green0\blue0;\red255\green0\blue0;\red0\green128\blue0;\red0\green0\blue255;\red255\green255\blue0;\red255\green0\blue255;\red128\green0\blue128;\red128\green0\blue0;\red0\green255\blue0;\red0\green255\blue255;\red0\green128\blue128;\red0\green0\blue128;\red255\green255\blue255;\red192\green192\blue192;\red128\green128\blue128;\red0\green0\blue0;}\wpprheadfoot1\paperw12240\paperh15840\margl1800\margr1800\margt1440\margb1440\headery254\footery254\endnhere\sectdefaultcl{\*\generator WPTools_5.370-PRM#c;}{\plain\fs22{\field{\*\fldinst{MERGEFIELD 1}}{\fldrslt{1}}} dh{\field{\*\fldinst{MERGEFIELD 7}}{\fldrslt{7}}}dcdn{\field{\*\fldinst{MERGEFIELD 3}}{\fldrslt{3}}}dnd {\field{\*\fldinst{MERGEFIELD 4}}{\fldrslt{4}}} nd ndjd {\field{\*\fldinst{MERGEFIELD 6}}{\fldrslt{6}}} dndn \par
    \plain\fs22 jjsc dsbcsdjbcsd {\field{\*\fldinst{MERGEFIELD 5}}{\fldrslt{5}}}\li0\fi0\ri0\sb0\sa0\ql\vertalt csdbnjcsd\par
    }}

    This works when I use the code below.
    Note that the possibility to use this option is not in the table for formattingstrings that is in the manual.

    Private Function SaveRtfFile() As Boolean
    Const OptionsString As String = "AUTO-nomergefields"
    Return WP.Memo.SaveToFile(_rtfFileName + "new.rtf", False, OptionsString) 'TODO: use correct file name
    End Function

    Thanks,
    Koob

    Hello,

    I created mergefields in the rtf editor. And set ShowFields to true. My fields are boxed now, and that is what we wish. But when I use the arrow keys to walk through the text, the cursor also visits the 'embeded' text that is in the mergefield (and also the field starter and the field closer). But I want to see them as one character.

    How to do this? So when I use arrows to walk through te text the cursor behaves like the mergefields are only one character?

    Thanks,
    Koob

    Hello,
    I have an rtf document, that I made in Ms Word 2000. I load it into the TextDynamic.Net rtf editor (in vb.net code). The document look exactly like before, when I open it in Word. Now I save it (in code). When I load it into the editor again, it looks ok. But when I open it in word, the document has 1 extra page: The first page is split into 2 pages, each containing one of the two tables that were on the first page.

    Questions:
    1) How can I check that this is a bug in Word, and not in the TextDynamic.Net editor?
    2) Can I be sure that the when I am going to use the saved rtf document on the server to create a pdf flie of it, it will not add the extra page? So: does wRtfToPdf use exactly the same algorithm that the TextDynamic.Net rtf editor uses to load the file?

    Thanks,
    Koob