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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

TTable To MS WORD

Status
Not open for further replies.

JustBeginer

Programmer
Mar 13, 2003
39
I want to export TTable to Word document. Does anyone have an idea how can I do this?
 
I have an example using a file of MSWord, so you can make some modifications iterating to make a "Table in Word"
the source code is this:
void __fastcall TForm1::FormCreate(TObject *Sender)
{
Variant Word;
// Create the object
Word = Variant::CreateObject("Word.Basic");
// We show
Word.Exec(Procedure("AppShow"));
// We create a new file
Word.Exec(Function("FileNew"));
// Insert text
Word.Exec(Procedure(&quot;Insert&quot;) <<
&quot;inserted text from C++ Builder&quot;);
// save the file
Word.Exec(Function(&quot;FileSaveAs&quot;) <<
&quot;Test.doc&quot;);
}
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top