To my knowledge, there is no such thing.
Once you open an RTF in Word, however, you can run a macro on the RTF file. But the macro will have to be stored in some other document/template/normal.dot.
i am actually running a script that generates RTF code, i need the row to be deleted before the document is opened in word. i was hoping for an rtf command that would delete a row while the script is running.
This code will find the first table in a document and delete the first row of it:
Sub Macro1()
Selection.GoTo What:=wdGoToTable, Which:=wdGoToNext, Count:=1, Name:=""
Selection.SelectRow
Selection.Cut
End Sub
But you cannot store macros in RTF files, so you'd have to have this code stored in normal.dot or some other file that is open before you open the RTF. You would likely want to make it run automatically when you open that RTF file.
I don't know when you're running it, but you could put a button in your normal.dot and give it a macro that opens that RTF file, uses the above code on it, and saves the file. Do you consider that to be *before* opening it? Anne Troy
this might work, but the only problem is I wont be the one opening the file. it will be downloaded via the web using php. i will try to figure something out, but thanks alot for your help, it might get me on the right track.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.