Export To Folder

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
 
S

Steve Rindsberg

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
 
G

Gil_H

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
 
S

Steve Rindsberg

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Top