Open pot file from VBA

  • Thread starter Thread starter black_sun
  • Start date Start date
B

black_sun

Hi to all,
I need an help about a problem that I don't understand.

I have a file POT that I want to open several times during the macro.
The problem is that it does not open a new file but it works on the
original file.

I use this instruction: Application.Presentations.Open ("C:\Work
\Pippo.pot")

Where do I do a mistake???

Thanks in advance to whom will help me!

Cheers
Denis
 
It's not really clear what you are trying to achieve.
Maybe one of these:
a) Open a .pot file and modify it and resave
b) Apply the template pippo.pot to the open file
c) Start a new presentation with the template pippo.pot applied
d) Something else entirely
 
When you use Presentations.Open("xyz.pot"), you are actually opening the
..pot file for modification. If you want to use your .pot file as template
for creating new presentations, you should add a new presentation using
Presentations.Add() and then apply your .pot file as a template using the
ApplyTemplate() method:
Pres = Presentations.Add()
Pres.ApplyTemplate "C:\Work\Pippo.pot"

- Chirag

PowerShow - View multiple PowerPoint slide shows simultaneously
http://officeone.mvps.org/powershow/powershow.html
 
Hi,
answer C but with a different: the pot file has no template, only
graphs and tables that I have to fill by VBA.

Thanks
Denis


John Wilson ha scritto:
 
Hi,
I tryed you method but it doesn't work as I don't have a template in
the file.
I have a blank slide and I put into graphics, tables and other
textframes by hand.


Thanks,
Denis



Chirag ha scritto:
 
..pot files are template files. Maybe start again and explain just what you
want to achieve and I'm sure we can all help
 
Hi,
I try :-)

I have a powerpoint file with inside charts and tables but they are
not into template format.
Every time I run my macro I need a new presentation with that format.

Thanks
Denis



John Wilson ha scritto:
 
Hi Denis,

It seems to me that you want to use the slides that are in the .pot file in
new .ppt files. You can perhaps copy the .pot file to the .ppt file and then
open the newly created .ppt file:

FileCopy "C:\Work\Pippo.pot", "C:\Work\MyNewPpt.ppt"
Pres = Presentations.Open("C:\Work\MyNewPpt.ppt")

Is this what you are looking for?

- Chirag

PowerShow - View multiple PowerPoint slide shows simultaneously
http://officeone.mvps.org/powershow/powershow.html
 
Hi Chirag,
More or less yes...
In this way you duplicate the file and then you open it.

As I have to use the macro several times I need that every time it is
a new presentation.

Ex:
1 - I open one or more blank presentations (no saved yet, I can't say
how many users will connect to the file at the same time)
2 - I copy the slide of the file pot in the new presentation (without
opening the file pot)
3 - Insert data in the new presentation
4 - User saves presentation

Point 3 and 4 are not a problem... I can do them.. but I have trouble
in doing points 1 and 2.


I could do this:
1 - Make him to choose the path and the name of the new file
2 - Duplicate the template
3 - Insert data
ecc...

but I wanted to know if there was a different and faster way to do it


Thanks
Denis



Chirag ha scritto:
 
Hi Chirag,
More or less yes...
In this way you duplicate the file and then you open it.

Or you can open the .POT and save it as a new .PPT.
As I have to use the macro several times I need that every time it is
a new presentation.

Ex:
1 - I open one or more blank presentations (no saved yet, I can't say
how many users will connect to the file at the same time)
2 - I copy the slide of the file pot in the new presentation (without
opening the file pot)

You could do this as well if you know in advance how many slides are in the .POT

Open a new presentation
Apply the .POT as a template
Use insert slides from file to insert all of the slides from the .POT into your
current presentation
 
I think I know what you mean. Try this:

Presentations.Open FileName:=".....\...\...pot", Untitled:=msoTrue

This should give you a new file based on your template.
 
Hi,
thanks for your reply... This could be a solution.
I see what I must use...

Thanks a lot!!!!


Cheers,
Denis




Steve Rindsberg ha scritto:
 
Hi Kathy,

yes... it exactly what I wanted.

Thnaks a lot to whom helped me!!!


Thanks thanks thanks!!!

Cheers
Denis


PS: Do you know where can I find manuals about VBA PowerPoint?


Kathy Kensche CreativeTemplateSolutions nospamplease ha scritto:
 
Back
Top