PowerPoint manipulation 
Author Message
 PowerPoint manipulation

Hello,

I try to manipulate PowerPoint through VB6 with the proper references

It works well but I don't know how to add a text box or a picture to
the active slide

The following code returns an "Out of range" error

PPApp.ActivePresentation.Slides.Item(1).Shapes.AddPicture(FileName:="C:
\25582.jpg", LinkToFile:=msoFalse, SaveWithDocument:=msoTrue,
Left:=273, Top:=168, Width:=174, Height:=205).Select

The code works well if activated in VBA

Any clue?

Thanks
Avi



Wed, 18 Jan 2012 19:06:25 GMT  
 PowerPoint manipulation

Quote:
> Hello,

> I try to manipulate PowerPoint through VB6 with the proper references

> It works well but I don't know how to add a text box or a picture to
> the active slide

> The following code returns an "Out of range" error

> PPApp.ActivePresentation.Slides.Item(1).Shapes.AddPicture(FileName:="C:
> \25582.jpg", LinkToFile:=msoFalse, SaveWithDocument:=msoTrue,
> Left:=273, Top:=168, Width:=174, Height:=205).Select

> The code works well if activated in VBA

> Any clue?

> Thanks
> Avi

Try looking for clues when recording macro in ppt... my testcase gave:
(lost VB6 so I cant test furter)

    ActiveWindow.Selection.SlideRange.Shapes.AddPicture(FileName:="C:
\a.jpg", LinkToFile:=msoFalse, SaveWithDocument:=msoTrue, Left:=182,
Top:=201, Width:=356, Height:=139).Select



Wed, 18 Jan 2012 20:01:50 GMT  
 PowerPoint manipulation
found some example for vba in kb 222929


Wed, 18 Jan 2012 20:07:33 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. *Urgent!* Compatibility with Powerpoint 97 *and* Powerpoint 2000

2. Displaying Powerpoint slides outside powerpoint

3. Format PowerPoint Table from Access

4. Automating PowerPoint from Access

5. Updating PowerPoint Presentation graphs using data from Access

6. Update Powerpoint charts with Access??

7. Export reports to powerpoint presentation

8. PowerPoint Presentations based on Access Databases.

9. PowerPoint Presentations

10. powerpoint help

11. generating powerpoint slides with graphs

12. Powerpoint/Vba -Embedding Images In Toggle Buttons?

 

 
Powered by phpBB® Forum Software