Hi, I am developing an indd file programatically with C#.NET. I am importing an XML successfully and want to design the indd file with the value of the XML. The problem is that I am not being able to write the values to the textframe. I have the indesign CS3 trial version installed in my computer. Here is the code below.
Type indAppType = Type.GetTypeFromProgID("InDesign.Application");
InDesign.Application myInDesign = (InDesign.Application)Activator.CreateInstance(indAppType, true);
InDesign.Document myDocument = myInDesign.Documents.Add(true, myInDesign.DocumentPresets[1]);
InDesign.Page myPage = (InDesign.Page) myDocument.Pages[1];
myDocument.ImportXML(Server.MapPath("Indesing-doc/bhaskar.xml"));
InDesign.Rectangle myRectangleA = myPage.Rectangles.Add(myDocument.Layers[1], InDesign.idLocationOptions.idUnknown, myPage);
myRectangleA.GeometricBounds = new string [4] {"70pt", "70pt", "180pt", "500pt"};
InDesign.TextFrame textFrameA = myRectangleA.TextFrames.Add(myDocument.Layers[1], InDesign.idLocationOptions.idUnknown, myRectangleA);
textFrameA.GeometricBounds = new string[4] { "80pt", "80pt", "140pt", "450pt" };
/*
Here I want to add my text in the textFrameA and want to fill the myRectangleA with the Orange colour. Please help me. Or if you can show me the way to associate the textFrameA or myRectangleA with the element of the XML, that will also be helpful.
*/
myDocument.Close(idSaveOptions.idNo, Server.MapPath("testing"));
My Product Information:
LiveCycle Designer Pro 8.1 / Windows
Offline

I hate to tell you this Bhaskar, but this forum is only for Acrobat JavaScript questions. There are many fine InDesign forums, try:
http://www.adobeforums.com/
Offline
AcrobatUsers.com >> User Groups • News • Events • Articles • Blogs • How To • Resources • Member Log in