Beiträge von MichaelW

    Hello,

    I have been experiencing a strange issue with the WPRichText component where the LayoutMode is set to wplayExtendedPageGap and the view of the document seems to jump around when the user attempts to modify it. This behaviour is intermittent, in that it always happens when editing a given paragraph in one document, but in another document it may be fine. I have not been able to find a common factor.

    Specifically, when the user enters text on the first page of the document, the rich text component jumps to the following page with the cursor displayed in the top left corner of the window. Typing in subsequent text enters the text in the original position (off-screen), and hitting the Enter key returns to the first page.

    After the view jumps to the second page, all of the following properties appear to indicate that as far as the component is concerned, it is still displaying the first page: PageNumber, CPPage, TopOffset, YOffset. The view change seems to happen between the KeyPress and Changed events. Any ideas?

    Thanks,

    Michael.

    I have found that the code suggested by wpsupport does not work if you have nested groups, as in this instance, if there is no text between the end of the group and the end of its parent group, the nextPar property returns nil.

    I have found that the following code is more effective for nested groups:

    Julian,

    I know the subject line sounds confusing.

    We have recently upgraded our component set from WPTools4 to WPTools5, and I am the developer charged with administering this upgrade. We have some complex functionality to cut across, and I am having serious difficulties with it.

    In our system, administrator users create document templates, including merge bands and data fields, using a setup program. In our main application, this template fields and bands are populated with different data (using WPSuperMerge) based on which persons details are currently open.

    The difficulty lies in that there is a requirement for users of the main application to be able to edit the document, but the document must maintain up-to-date information after the edit (i.e. maintain bands and fields). For ease of use, our specification dictates that while editing the document, the user must see the document with all merged information, with the merged data being protected.

    Thus, after editing, the requirement exists to take the changes the user has made, and merge them back into the original template. This seemed to be working OK with WPTools4, as we would simply mark the start and end of merged data with special characters in both the template and the merged data, and then copy the RTF source of all non-data sections of the edited merged document (using the SelectionAsString property) to the corresponding section in the template.

    However, WPTools5 does not seem to implement the same markers for merge starts and ends [paprIsMergeCommandStart] that we were using to tell us where to insert the markers.

    Is there any advice you could give us on the best way to mark sections of text that will survive the merging process (with WPSuperMerge) reliably? I have tried using bookmarks but have found that I can not rely on them to get through the merging process untouched. Any help you can give us would be appreciated, it's quite a frustrating task.

    Thanks,

    Michael Webb