I spent all of yesterday scouring the help file, scouring WPRTFDefs source code etc etc. I was absolutely determined to sort this out myself without posting on this newsgroup. And I am pleased to report that after 10 hours of going around and around in circles, here I am.
I'm guessing the answer to what I want is as plain as the nose on my face.
I am using bookmarks as containers for text (possible multi paragraphs), other objects etc. I want to be able to make the text and objects etc within the bookmark tags visible or invisible depending on user set criteria. This gives the user the ability to make whole blocks of text, images etc visible or invisible depending on criteria such as whether a particular document is being dispatched by fax or email.
I need to be able to hide and restore all of the contents within the bookmark tags and restore it when required exactly as it originally was.
I've tried using afsHidden, but this doesn't seem to strip out all the carriage returns.
I've tried storing the object's embeddedtext elsewhere, clearing the embedded text and then restoring it later. This worked well on clearing, but as one might expect it does not restore carriage returns (and I assume it would not restore other objects).
I then tried looking at the source for wpRTFDefs and looking at the undocumented block properties eg block_par_s etc. I couldn't get these toowork at all. I also couldn't figure out how, once you'd blocked the text, you accessed this new block. Could find no obvious function documented or otherwise to do this.
So, here's the question(s):
1. Is there a simple way of making the whole contents between bookmarks visible and invisible including all paragraphs, carriage returns and any objects?
2. If the answer is no, then how do I access the rtftext as string between the bookmark tags?
Sorry for the length of the message, just keen to let you know that I do not use this newsgroup lightly!