using PowerPoint Object (COM Component) in .NET

G

Guest

Hello, This is Adeel! Well i'm a software developer here in Pakistan working
on Microsoft C#. Can you u plz help me out i have a problem in creating an
ARROW-CONNECTOR SHAPE using Microsoft PowerPoint Object through Code. I'm
generating a Dynamic Presentation from my Application. Looking forward
towards ur Reply..


Actually i do have a Code for VB6 that generates it but i am unable to find
it in .NET coz these COM component are wrapped when accessed from .NET its
hard to find search these Object in it.

Sample Code
---------------

ActiveWindow.Selection.SlideRange.Shapes.AddConnector(msoConnectorStraight,
156#, 456#, 156#, 30#).Select
ActiveWindow.Selection.ShapeRange.Line.EndArrowheadStyle =
msoArrowheadTriangle
ActiveWindow.Selection.SlideRange.Shapes.AddConnector(msoConnectorElbow,
234#, 84#, 192#, 60#).Select
With ActiveWindow.Selection.ShapeRange
.Line.BeginArrowheadStyle = msoArrowheadTriangle
.Line.EndArrowheadStyle = msoArrowheadTriangle
End With

If anyone have an idea about this that how to write relevant code in C# or
VB.NET so plzzz help me out.... or u can reply me at (e-mail address removed)
or post it rite here...

thx

Regards

Adeel...
 
S

Sujith S. Varier

Yaar,

This doesnt seem to be a VB6.0 code, but VBA. If you have the code that
accesses powerpoint objects from a VB 6.0 Application, on going through the
code you may find that an instance of the powerpoint application has been
made as the first step.I think you have to follow the same approach once
again in VB.Net or C#. Add a reference to the powerpoint object library.
Create an instance of the powerpoint application object and then whichever
object that you need as per your requirement. The sample VBA code you have
given here is one which may work, but with slight modifications since this
has been written to run from within the powerpoint applicaiton as far as i
could find. The MSDN is a gr8 help in this regard, friend. :)

regards
Sujith.S Varier
 

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