Export To Folder

  • Thread starter Thread starter Gil_H
  • Start date Start date
G

Gil_H

Hi EV1,

I have a simple question....Look at this code:

MyShape.Export "\MyShape", ppShapeFormatJPG

In which folder this shape is saved?

Thanx,
Gil H
 
Hi EV1,

I have a simple question....Look at this code:

MyShape.Export "\MyShape", ppShapeFormatJPG

In which folder this shape is saved?

Why not use this instead and be sure of what you'll get:

MyShape.Export "c:\myfolder\MyShape.jpg", ppShapeFormatJPG
 
Why not use this instead and be sure of what you'll get:
MyShape.Export "c:\myfolder\MyShape.jpg", ppShapeFormatJPG

Because i am using it as an addin, and what if that user don't want me
to fill his folder with this shapes? and worse, does the user have the
capability to block c:\ from writing?

Anyway, i'll do that, and afterwards i'll "Kill" Those files at the
Exit Procedure.

Thanx a lot,
Gil H
 
Because i am using it as an addin, and what if that user don't want me
to fill his folder with this shapes? and worse, does the user have the
capability to block c:\ from writing?

I didn't mean to use that path literally; just choose some path you CAN write
to rather than trying to guess at what PPT and Windows will do when you let
them choose. The user's TEMP folder is generally a safe bet; if the user
can't write to it, the user has bigger problems than your add-in is likely to
be able to solve. <g>

There's a function here that not only returns the temp folder but generates
temp filenames for you:

http://vbnet.mvps.org/index.html?code/fileapi/gettempfilename.htm
Anyway, i'll do that, and afterwards i'll "Kill" Those files at the
Exit Procedure.

You may also need to look for and kill them at startup; PowerPoint has a habit
of holding files open when it shouldn't.
 
Back
Top