C# write a Word Doc InsertFormula problem

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • jiatiejun

    #1

    C# write a Word Doc InsertFormula problem

    I want insert a Formula in word document,
    try follow code:

    wordDoc.Tables. Item(10).Cell(i +n, 2).Range.Select ();
    Object o1 = "=SUM(ABOVE )";
    o2 = Type.Missing;
    wordApp.Selecti on.InsertFormul a(ref o1,ref o1);

    but Word output the code is "{=SUM(ABOV E) \# "=SUM(ABOVE )"}"

    so the Formula can't compute ,

    why, the code is ok in VB.NET or VB 6

    thanks


  • jiatiejun

    #2
    Sorry! the second Parameter is error


    "jiatiejun" <jiahome@263.ne t> дÈëÓʼþ
    news:%23LKVMkWo DHA.2772@TK2MSF TNGP10.phx.gbl. ..[color=blue]
    > I want insert a Formula in word document,
    > try follow code:
    >
    > wordDoc.Tables. Item(10).Cell(i +n, 2).Range.Select ();
    > Object o1 = "=SUM(ABOVE )";
    > o2 = Type.Missing;
    > wordApp.Selecti on.InsertFormul a(ref o1,ref o1);
    >
    > but Word output the code is "{=SUM(ABOV E) \# "=SUM(ABOVE )"}"
    >
    > so the Formula can't compute ,
    >
    > why, the code is ok in VB.NET or VB 6
    >
    > thanks
    >
    >[/color]


    Comment

    Working...