access to a embedded PoerwerPoint OLE Object

M

Michael Freitter

Greetings,

I have a embedded PowerPoint OLE Object in the Gantt-Chart.
In the PowerPoint Slide, there is a text-shape with the text "hello"

How can I access from project VBA to the text-shape in the PowerPoint OLE
and read the text "hello" and show it in a msgbox?

Thank you

regards
Michael Freitter
 
M

Michael Freitter

Greetings,

sorry, when I not exactly wordded.
My problem is a ms-Project and not a PowerPoint problem.

I have a project-file (2003) and I have insert in the Gantt-chart an ole
object. (e.g. Powerpoint)

How can I access from vba-code in the ms-project file to the Powerpoint OLE
(e.g. a shape in a slide) ?

Regards
Michael Freitter
 
R

Rod Gill

I can't find a method that manipulates an object (brief search of the Object
Browser). An alternative way is to add a Hyperlink to the PowerPoint file
from a relevant task. You can then use a followHyperlink method to open the
file in PowerPoint.

--

Rod Gill
Microsoft MVP for Project

Author of the only book on Project VBA, see:
http://www.projectvbabook.com
 
M

Michael Freitter

Thank's for the information.

Maybe there exists an other way.
Is it possible to read tasksinformation in the project file from the vba
code, which is included in the OLE Object?

Regards
Michael Freitter
 
R

Rod Gill

You can't get any information from the Object until it is open. So, follow a
hyperlink to open the object. Provided you know its a PowerPoint file you
can then use automation to read and set data in the active PowerPoint file.

Once the PowerPoint file is open, VBA code in it can run to read data from
Project. You could have an afterOpen event run the code and test for an open
project with the correct name.

--

Rod Gill
Microsoft MVP for Project

Author of the only book on Project VBA, see:
http://www.projectvbabook.com
 

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