Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

anyone know RTF coding?

Status
Not open for further replies.

sjh7899

Programmer
Jun 11, 2002
20
0
0
CA
hi

if you know anything about rtf coding i would like to ask if there is a way to delete a row from a table in MS Word using rtf.

Thanks Steve.
 
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.

Does that help? Anne Troy
 
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.

Steve.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top