a question about powerpoint 2007's put_rtf function

  • Thread starter Thread starter lai
  • Start date Start date
L

lai

Hi

I am trying to create PowerPoint file with my own code. When I try to
add a
textbox to PowerPoint, I found, in the version 2007, CShape.put_RTF()
function will not work. For the version 2003, it works fine.
I have tried both VC and also C#, they show the same result.

The error message in VC is: 0x80004001
and the message in C# is:
System.NotImplementedException.

Is this because my code has problem or they really havnt implement the
code?
Could you give some hints how can I put text with format (rtf) to
powerpoint textbox?

Thanks

Best regards,
Yujing
//////////////////////////////////////////////////////
part of the code:

//Open powerpoint, get CSlide object and CShapes object...

CShape
sTextBox( shapes.AddTextbox( Office::msoTextOrientationHorizontal,
100, 100, 100, 100);

sTextBox.put_RTF(_T("get problem in this line"));
 
I don't see any such function in PowerPoint 2003. Do you have a reference
to this in the online documentation?
 
No, I dont.

I import the powerpoint typelib to VC++ and get this...
void put_RTF(LPCTSTR newValue)
{
static BYTE parms[] = VTS_BSTR ;
InvokeHelper(0x90, DISPATCH_PROPERTYPUT, VT_EMPTY, NULL, parms,
newValue);
}

yujing
 
Back
Top