C
CAIBird
Hi,
I have recently been coding with VC++. I use an automation client to add an
equation to a word document hereunder:
......
_Application app;
app.CreateDispatch("Word.Application");
app.SetVisible(TRUE);
_variant_t vtNULL((long)DISP_E_PARAMNOTFOUND,
VT_ERROR);
Documents docs(app.GetDocuments());
_Document _doc(docs.Add(&vtNULL,
&vtNULL,
&vtNULL,
&vtNULL));
InlineShapes shapes(_doc.GetInlineShapes());
_variant_t vtCls("Equation.3");
LPDISPATCH lpDisp =
shapes.AddOLEObject(&vtCls,
&vtNULL,
&vtNULL,
&vtNULL,
&vtNULL,
&vtNULL,
&vtNULL,
&vtNULL);
......
the equation is inserted successfully and the inserting function returns a
pointer of type LPDISPATCH to the OLE object.
My question is, how can i add more content to the equation with this pointer?
Is there a type lib for "Microsoft Equation.3"?
Thanks in advance
Joe
China
I have recently been coding with VC++. I use an automation client to add an
equation to a word document hereunder:
......
_Application app;
app.CreateDispatch("Word.Application");
app.SetVisible(TRUE);
_variant_t vtNULL((long)DISP_E_PARAMNOTFOUND,
VT_ERROR);
Documents docs(app.GetDocuments());
_Document _doc(docs.Add(&vtNULL,
&vtNULL,
&vtNULL,
&vtNULL));
InlineShapes shapes(_doc.GetInlineShapes());
_variant_t vtCls("Equation.3");
LPDISPATCH lpDisp =
shapes.AddOLEObject(&vtCls,
&vtNULL,
&vtNULL,
&vtNULL,
&vtNULL,
&vtNULL,
&vtNULL,
&vtNULL);
......
the equation is inserted successfully and the inserting function returns a
pointer of type LPDISPATCH to the OLE object.
My question is, how can i add more content to the equation with this pointer?
Is there a type lib for "Microsoft Equation.3"?
Thanks in advance
Joe
China