C# and Ms Word intigration

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • AliDDK
    New Member
    • May 2007
    • 1

    C# and Ms Word intigration

    Dear Friends,
    I am seeking help, to create a dynamic doc file using XHTML and CSS. I need some codes to create a doc file by using xslt/css and XML.

    I have intigrated WORD dll into my project. and creating a doc file as fallowing.

    Is there any one can help´?
    With Regards
    Ali

    -------------------------------------------- MS WORD-------------------------------------
    private Word.Applicatio n WordApp;
    private Word.Document WordDoc;

    object missing = System.Reflecti on.Missing.Valu e;
    //----- Sti til DOT fil
    object fileName = "c:\\word\\Soft Shield.dot";
    object newTemplate = false;
    object docType = 0;
    object isVisible = true;

    WordApp = new Word.Applicatio nClass();

    WordDoc = WordApp.Documen ts.Add(ref fileName, ref newTemplate, ref docType, ref isVisible);
    WordApp.Visible = true;
    WordDoc.Activat e();

    WordApp.Selecti on.ParagraphFor mat.Alignment = Word.WdParagrap hAlignment.wdAl ignParagraphLef t;
    object oBookMark = SetBookmark;
    WordDoc.Bookmar ks.get_Item(ref oBookMark).Rang e.Text = "TEST My bookmark text";
Working...