RLI, Rich text from Access2007 to Powerpoint

R

Rob

I have an Access2007 application with a rich text formatted database field
and i want to import this field into powerpoint with VBA.

I have tried code like this:

ppApp.ActiveWindow.Selection.SlideRange.Shapes.AddShape(msoShapeRectangle,
416.75, 411.75, 262, 90).Select
ppApp.ActiveWindow.Selection.ShapeRange.TextFrame.TextRange.Select
ppApp.ActiveWindow.Selection.ShapeRange.TextFrame.TextRange.Characters(start:=1, Length:=0).Select
With ppApp.ActiveWindow.Selection.TextRange
.text = rs.Fields("NameOfMyDatabaseField")
End With

This code imports the text field, but just as plain text, showing the rich
text markup.

Then i tried to copy paste the text:
adding .cut within the with and
ppApp.ActiveWindow.Selection.ShapeRange.TextFrame.TextRange.PasteSpecial
ppPasteRTF
to paste as rich text.

But it still pasts as plain text.
Is there a way to tell powerpoint the text should imported as Rich Text ?

Any help would be much appreciated
 
T

Tom van Stiphout

On Mon, 6 Apr 2009 22:50:02 -0700, Rob <[email protected]>
wrote:

Only if you use a rich text box in PPT. I'm not even sure it has one.
Standard UI elements cannot display rich text. If nothing else, a 3rd
party RTF control may do the trick.

One alternative is to use HTML and the webbrowser control.

-Tom.
Microsoft Access MVP
 

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