Keeping track of pasted text? 
Author Message
 Keeping track of pasted text?

I have a module that converts some equation objects in a Word document
to a text format like MathML or LaTeX. I loop through the equations in
the document, call a function from a DLL to put the converted text on
the clipboard, and then paste it into the document.

Here's the problem: after doing some operations on the document, I
need to restore it as it was before I put in the pasted text. Making a
copy of the document and reverting to it is not an option for me. So
what I need to be able to do is to keep track of the ranges of all my
pasted text so that I can simply do Range.Delete later on. How would I
do this? Right now I am just pasting the text near the appropriate
equation, but I have no idea as to how I can get the pasted text's
range.

Is there a way to keep track of where exactly pasted text has been
inserted into a document?



Tue, 20 Jan 2004 02:53:56 GMT  
 Keeping track of pasted text?
Any ideas, guys?


Sun, 25 Jan 2004 00:04:21 GMT  
 Keeping track of pasted text?
Hi Bill

Dim PastedRange As Range

Set PastedRange = ActiveDocument.Paragraphs(2).Range
PastedRange.Collapse wdCollapseEnd
PastedRange.Paste

'then later
PastedRange.Delete

Regards

Dave


| I have a module that converts some equation objects in a Word document
| to a text format like MathML or LaTeX. I loop through the equations in
| the document, call a function from a DLL to put the converted text on
| the clipboard, and then paste it into the document.
|
| Here's the problem: after doing some operations on the document, I
| need to restore it as it was before I put in the pasted text. Making a
| copy of the document and reverting to it is not an option for me. So
| what I need to be able to do is to keep track of the ranges of all my
| pasted text so that I can simply do Range.Delete later on. How would I
| do this? Right now I am just pasting the text near the appropriate
| equation, but I have no idea as to how I can get the pasted text's
| range.
|
| Is there a way to keep track of where exactly pasted text has been
| inserted into a document?



Sun, 25 Jan 2004 02:25:31 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. keeping Track Of Record

2. Keeping Track of Database Modifications?!?!

3. Keeping track of Users Online

4. Keeping track of Database changes!?

5. KEEPING TRACK OF WORD DOC FILES

6. Keeping track of all those functions!?!?!

7. Keeping track of the time that Outlook was shutdown

8. Program to keep track on how much time you speend connected to internet

9. Keep track of day count

10. 'keep track of formatting' option

11. How to keep track on documents made?

12. Keeping track of class instances

 

 
Powered by phpBB® Forum Software