 |
wpcubed.com WPCubed GmbH Support Forum
|
| View previous topic :: View next topic |
| Author |
Message |
aolson
Joined: 19 Sep 2005 Posts: 43
|
Posted: Tue Mar 16, 2010 6:32 pm Post subject: Question on Dynamically building a document |
|
|
I have existing code which works as I want it. I'm having a user build a document, then i'm saving the document in a totally custom format for reasons we do not need to get into at this point. Suffice it to say - it would be easier to save as RTF but that's not possible.
Anyway, now i'm working on the code which loads these documetns and then rebuilds the document in the WPTools editor. I have pretty much everythign working perfectly except for TWPTextObjs.
I think the problem i'm running into is due to where the cursor moves to as I'm building the document. Quick question - how do I ensure that after I append a paragraph and set the text, that the cursort/insertion point is always at teh end of the document?
Thanks,
Alan |
|
| Back to top |
|
 |
wpsupport Site Admin
Joined: 24 Oct 2003 Posts: 5658
|
Posted: Wed Mar 17, 2010 8:58 am Post subject: |
|
|
Hi,
Usually I do not recommend to use cursor operations to load a document. If it is not possible to build a custom reader (See WPIOANSI for a start) it must be possible to use par references (TParagraph object) to build it.
TParagraph has all the methods which are required, such as Append, Inser, AppendObject etc.
| Quote: | | I think the problem i'm running into is due to where the cursor moves to as I'm building the document. Quick question - how do I ensure that after I append a paragraph and set the text, that the cursort/insertion point is always at teh end of the document? |
WPRichText.TextCursor.MoveTo(lastpar, Lastpar.CharCount) does it.
Julian |
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|