a question about powerpoint 2007's put_rtf function

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"));
 
C

ChrisHarrington

I don't see any such function in PowerPoint 2003. Do you have a reference
to this in the online documentation?
 
L

lai

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top