BorlandTalk.com Forum Index BorlandTalk.com
Borland discussion newsgroups
 
Archives   FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

PowerPoint and Delphi

 
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> Delphi OLE Automation
View previous topic :: View next topic  
Author Message
Stuart Reid
Guest





PostPosted: Thu Apr 28, 2005 6:37 am    Post subject: PowerPoint and Delphi Reply with quote



Hi,

I have been asked to create an application.

The application is supposed to be a database application where the
database contains a set of unique powerpoint slides so they can be
indexed.

The user needs to be able to create PowerPoint presentations every
week out of the core set of PPT slides (possibly in the region of
1000+ slides in total). The presentation the user will end up creating
may have say 10 slides out of the full selection.
There will be something like 10 different categories of slides and the
user can select as many or as few from each category as they like to
build a new presentation from scratch. I don't want to have to have
all the slides in the presentation and simply hide the unused ones -
that's very poor.

Since I have very limited knowledge of PowerPoint, I need a *lot* of
help (please). I have searched through this group and haven't found
much that helps me. Preferably this would be done without the use of
3rd party components. I'm using D7Enterprise at the moment on Windows
XP.

An alternative to the database idea is possibly storing the invidual
slides just as files and then have a databse that stores the filename
- in which case I would then be able to "merge" a group of the
individual slides into a presentation.

My questions...

1) is it possible to store PowerPoint slides individually in a
database table?

2) is it possible to store PowerPoint slides individually as files on
disk?

3) is it possible to display a PowerPoint slide in a delphi app - like
on the top of a panel or something rather than firing up PowerPoint
from within Delphi?

3) how would I go about creating a new PowerPoint presentation from
scratch within Delphi and then add the slides stored in the database
or on the disk?

4) any other suggestions as to possible solutions would be greatly
appreciated as well.

Thanks in advance.
Back to top
Al White
Guest





PostPosted: Fri May 13, 2005 4:50 pm    Post subject: Re: PowerPoint and Delphi Reply with quote



No replies yet? Hmmm...

I've done a fair amount of Delphi and PowerPoint stuff in D7/Pro and Powerpoint 2003, including word searches, etc...

I'd also like to try the slide-in-a-database thing. I'll give it a shot and see if I can figure anything out.

Al

--
Al White

"Stuart Reid" <reid_stu@n.o.s.p.a.m.hotmail.com> wrote

Hi,

I have been asked to create an application.

The application is supposed to be a database application where the
database contains a set of unique powerpoint slides so they can be
indexed.

The user needs to be able to create PowerPoint presentations every
week out of the core set of PPT slides (possibly in the region of
1000+ slides in total). The presentation the user will end up creating
may have say 10 slides out of the full selection.
There will be something like 10 different categories of slides and the
user can select as many or as few from each category as they like to
build a new presentation from scratch. I don't want to have to have
all the slides in the presentation and simply hide the unused ones -
that's very poor.

Since I have very limited knowledge of PowerPoint, I need a *lot* of
help (please). I have searched through this group and haven't found
much that helps me. Preferably this would be done without the use of
3rd party components. I'm using D7Enterprise at the moment on Windows
XP.

An alternative to the database idea is possibly storing the invidual
slides just as files and then have a databse that stores the filename
- in which case I would then be able to "merge" a group of the
individual slides into a presentation.

My questions...

1) is it possible to store PowerPoint slides individually in a
database table?

2) is it possible to store PowerPoint slides individually as files on
disk?

3) is it possible to display a PowerPoint slide in a delphi app - like
on the top of a panel or something rather than firing up PowerPoint
from within Delphi?

3) how would I go about creating a new PowerPoint presentation from
scratch within Delphi and then add the slides stored in the database
or on the disk?

4) any other suggestions as to possible solutions would be greatly
appreciated as well.

Thanks in advance.


Back to top
George Birbilis
Guest





PostPosted: Mon May 16, 2005 7:50 am    Post subject: Re: PowerPoint and Delphi Reply with quote



look at IStream and IStorage interfaces (Structured Storage) and also
IDataObject (maybe, not sure), IPersistStorage and IPersistStream interfaces
(you make an IStorage that contains other IStorage and IStream [like folders
and files] and you pass them to the PowerPoint object that implements
IPersistStorage/IPersistStream respectively [depending on what you need to
store)

-----
George Birbilis (birbilis (AT) kagi (DOT) com)
Microsoft Most Valuable Professional
MVP J# for 2004 & 2005
http://www.kagi.com/birbilis
--------------
"Al White" <v2cib226 (AT) netscape (DOT) net> wrote

Quote:
No replies yet? Hmmm...

I've done a fair amount of Delphi and PowerPoint stuff in D7/Pro and
Powerpoint 2003, including word searches, etc...

I'd also like to try the slide-in-a-database thing. I'll give it a shot
and see if I can figure anything out.

Al

--
Al White

"Stuart Reid" <reid_stu@n.o.s.p.a.m.hotmail.com> wrote in message
news:i30171l5i2nv1s8jjlgqeqursmgcs2ovff (AT) 4ax (DOT) com...
Hi,

I have been asked to create an application.

The application is supposed to be a database application where the
database contains a set of unique powerpoint slides so they can be
indexed.

The user needs to be able to create PowerPoint presentations every
week out of the core set of PPT slides (possibly in the region of
1000+ slides in total). The presentation the user will end up creating
may have say 10 slides out of the full selection.
There will be something like 10 different categories of slides and the
user can select as many or as few from each category as they like to
build a new presentation from scratch. I don't want to have to have
all the slides in the presentation and simply hide the unused ones -
that's very poor.

Since I have very limited knowledge of PowerPoint, I need a *lot* of
help (please). I have searched through this group and haven't found
much that helps me. Preferably this would be done without the use of
3rd party components. I'm using D7Enterprise at the moment on Windows
XP.

An alternative to the database idea is possibly storing the invidual
slides just as files and then have a databse that stores the filename
- in which case I would then be able to "merge" a group of the
individual slides into a presentation.

My questions...

1) is it possible to store PowerPoint slides individually in a
database table?

2) is it possible to store PowerPoint slides individually as files on
disk?

3) is it possible to display a PowerPoint slide in a delphi app - like
on the top of a panel or something rather than firing up PowerPoint
from within Delphi?

3) how would I go about creating a new PowerPoint presentation from
scratch within Delphi and then add the slides stored in the database
or on the disk?

4) any other suggestions as to possible solutions would be greatly
appreciated as well.

Thanks in advance.





Back to top
Patrick Shields
Guest





PostPosted: Mon May 16, 2005 9:16 pm    Post subject: Re: PowerPoint and Delphi Reply with quote

Stuart Reid <reid_stu@n.o.s.p.a.m.hotmail.com> wrote:

Quote:
Hi,

I have been asked to create an application.

The application is supposed to be a database application where the
database contains a set of unique powerpoint slides so they can be
indexed.

The user needs to be able to create PowerPoint presentations every
week out of the core set of PPT slides (possibly in the region of
1000+ slides in total). The presentation the user will end up creating
may have say 10 slides out of the full selection.
There will be something like 10 different categories of slides and the
user can select as many or as few from each category as they like to
build a new presentation from scratch. I don't want to have to have
all the slides in the presentation and simply hide the unused ones -
that's very poor.

Since I have very limited knowledge of PowerPoint, I need a *lot* of
help (please). I have searched through this group and haven't found
much that helps me. Preferably this would be done without the use of
3rd party components. I'm using D7Enterprise at the moment on Windows
XP.

An alternative to the database idea is possibly storing the invidual
slides just as files and then have a databse that stores the filename
- in which case I would then be able to "merge" a group of the
individual slides into a presentation.

My questions...

1) is it possible to store PowerPoint slides individually in a
database table?

2) is it possible to store PowerPoint slides individually as files on
disk?

3) is it possible to display a PowerPoint slide in a delphi app - like
on the top of a panel or something rather than firing up PowerPoint
from within Delphi?

3) how would I go about creating a new PowerPoint presentation from
scratch within Delphi and then add the slides stored in the database
or on the disk?

4) any other suggestions as to possible solutions would be greatly
appreciated as well.

Thanks in advance.

I'm using D5, but it should be close enough to the same thing.
I don't know how to advise you on the database side of this, but for
the PowerPoint stuff you should be able to use the automation servers
that come with Delphi to do all this. In D5 there is a demo in:

C:Program
FilesBorlandDelphi5DemosActivexOleautoSrvCompPowerPoint

That shows the basics (like opening and creating ppt files).

For assembling a presentation from slides in other presentations I
have a treeview that shows the .ppt files in a directory the user has
choosen. I add child nodes for each slide in a file and use the slide
title as the description. something like:

for i:=1 to PowerPointPresentation1.slides.count do begin
with PowerPointPresentation1.slides.item(i) do begin
if (shapes.hasTitle <> 0)
then begin
desc:=shapes.title.TextFrame.TextRange.Text;
//add node to treeview
end;
end;
end;

When the user picks a slide to add to the destination file, I copy it
to the clipboard:

PowerPointPresentation1.slides.item(itempicked).copy; //to clipboard

then add it to the new file at the end with something like:

PPPresentationTarget.Slides.paste(-1);

For displaying slides I first do the slides.item(item ).copy which
also puts a metafile copy in the clipboard then use a timage on a
panel to display it. Something like:

Picture.metafile.Assign(Clipboard);

There are ways of getting the slide titles without firing up
PowerPoint using DCOM. Do a search for:
IStorage, IpropertySetStorage, IpropertyStorage, and PPropSpec.

HTH,
Patrick

Back to top
Display posts from previous:   
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> Delphi OLE Automation All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2006 phpBB Group
SEO toolkit © 2004-2006 webmedic.