Hi,

You can use following piece of code to create a table


static void Insert_intoword_Tableformat(Args _args)
{
    COM         document;
    COM         wordDocument;
    COM         wordRange;
    COM         app;
    CustTable   custTable;
    str         tableContent;
    ;

    app = new com("Word.Application");
    app.visible(true);
    document     = app.Documents();
    wordDocument = document.add();
    wordDocument.activate();
    wordRange   = wordDocument.range(0,0);
    while select AccountNum, Name From custTable
    {
        tableContent    += custTable.AccountNum + "\t" + custTable.Name +
"\n";
    }

    wordRange.insertAfter(strfmt(tableContent));
    wordRange.convertToTable();
}

But this would create only one table. For more than one it is better to
have a template file and then using that template file create tables. Will
send the code for that once it is developed. Till then try doing some R & D
on this piece of code and see if more than one table can be added or not.

Regards,

Sumit
On 5/8/07, karthik kumar <[EMAIL PROTECTED]> wrote:
>
>   Hi ,
>
> how can i create a 3 seperate tables in WORD document using with COM
> object in AX 3.0.
>
> Regards
> Karthikkumar
>
> __________________________________________________
> Do You Yahoo!?
> Tired of spam? Yahoo! Mail has the best spam protection around
> http://mail.yahoo.com
>
> [Non-text portions of this message have been removed]
>
> 
>


[Non-text portions of this message have been removed]

Reply via email to