PC Review


Reply
Thread Tools Rate Thread

Automating powerpoint creation using VB

 
 
Edward
Guest
Posts: n/a
 
      4th May 2010
Hello,

I'm working on creating some VB code to take excel information and generate
a powerpoint document based on it. Right now I'm having a very difficult time
finding ways to create a shape in a given location. For instance, say I want
to create a box of a given size at a given location in the new powerpoint
document... I haven't been able to find any commands that allow that. The
closest I've found is this: ppSlide2.Shapes.AddOLEObject cLeft, cTop, cWidth,
cHeight, "MSGraph.Chart"

However this creates a chart, not a simple shape, which is what I want.

I also want to be able to create lines to connect objects together, and so
far I haven't found any references to functions that can do this.

Can anyone help?

Thanks,
Edward
 
Reply With Quote
 
 
 
 
David Marcovitz
Guest
Posts: n/a
 
      4th May 2010
On 5/4/10 4:30 PM, Edward wrote:
> Hello,
>
> I'm working on creating some VB code to take excel information and generate
> a powerpoint document based on it. Right now I'm having a very difficult time
> finding ways to create a shape in a given location. For instance, say I want
> to create a box of a given size at a given location in the new powerpoint
> document... I haven't been able to find any commands that allow that. The
> closest I've found is this: ppSlide2.Shapes.AddOLEObject cLeft, cTop, cWidth,
> cHeight, "MSGraph.Chart"
>
> However this creates a chart, not a simple shape, which is what I want.
>
> I also want to be able to create lines to connect objects together, and so
> far I haven't found any references to functions that can do this.
>
> Can anyone help?
>
> Thanks,
> Edward


ppSlide2.Shapes.AddShape msoShapeRectangle, cLeft, cTop, cWidth, cHeight

should add a rectangle for you. If you want a different shape, there are
bunches of them.

--David

--
David M. Marcovitz
Author of _Powerful PowerPoint for Educators_
http://www.PowerfulPowerPoint.com/
Microsoft PowerPoint MVP
Associate Professor, Loyola University Maryland
 
Reply With Quote
 
Shyam Pillai
Guest
Posts: n/a
 
      5th May 2010
Use AddShape, AddTextBox, AddLine methods for a Slide object to begin with.


--
Regards,
Shyam Pillai
Handout Wizard: http://skp.mvps.org/how. PowerPoint 2010 (32-bit/64-bit)
versions supported.


"Edward" <(E-Mail Removed)> wrote in message
news:24DDABEC-8617-408C-B27E-(E-Mail Removed)...
> Hello,
>
> I'm working on creating some VB code to take excel information and
> generate
> a powerpoint document based on it. Right now I'm having a very difficult
> time
> finding ways to create a shape in a given location. For instance, say I
> want
> to create a box of a given size at a given location in the new powerpoint
> document... I haven't been able to find any commands that allow that. The
> closest I've found is this: ppSlide2.Shapes.AddOLEObject cLeft, cTop,
> cWidth,
> cHeight, "MSGraph.Chart"
>
> However this creates a chart, not a simple shape, which is what I want.
>
> I also want to be able to create lines to connect objects together, and so
> far I haven't found any references to functions that can do this.
>
> Can anyone help?
>
> Thanks,
> Edward


 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Help with Automating Word Doc Creation Rich Microsoft C# .NET 0 20th Dec 2007 02:19 PM
Automating the Creation of Userforms in VBA Noel Microsoft Excel Programming 4 15th Oct 2007 03:35 PM
Help with automating creation of Pie Chart(s) MP Microsoft Excel Charting 1 28th Sep 2006 11:42 PM
Automating hyperlink creation Steve Williams Microsoft Excel Worksheet Functions 1 14th Oct 2005 01:50 AM
Automating Powerpoint slide creation?? =?Utf-8?B?QW5keQ==?= Microsoft Powerpoint 2 17th Mar 2004 09:16 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 09:40 PM.