FileFind gone in 2004?!

B

Bryan Harris

I guess it's not a question, apparently the FileFind method in VBA is
gone in PowerPoint 2004.

So the real question is why... I read the post about it being a
stability issue, but I'm going to have to call bull on that one.
Maybe fear of macro viruses? Maybe laziness?

I read that this can supposedly be done with AppleScript? I need to
take a folder with 6 pngs and insert them onto a single slide, which I
do over and over. I already have the script working under Office X,
but I have no clue how to do it with 2004. Does anyone know how to
get AppleScript and VBA to play together? It doesn't look like AS can
do image imports, and I can't figure out how to make AS pass a VBA
script a list of files to import.

Does anyone have any pointers on this? Or has anyone gotten any of it
to work?

TIA.

- Bryan
 
S

Steve Rindsberg

I read that this can supposedly be done with AppleScript? I need to
take a folder with 6 pngs and insert them onto a single slide, which I
do over and over.

Do you know the path to the folder in advance?

If so:

Dim sFilename as String
Dim sPath as String
Dim sType as String

sPath = "Macintosh HD:Wherever:Files:Are:Stored:"
sType = "PNGf" ' not positive of this, but worth a try

sFileName = Dir$(sPath,MacID(sType))
While sFilename <> ""
' do whatever you need to do to the file
' then
' get the next file
sFilename = Dir$()
Wend

Should work in any version of VBA and with a few adaptations, is portable to
Windows.
I already have the script working under Office X,
but I have no clue how to do it with 2004. Does anyone know how to
get AppleScript and VBA to play together?

If you learn more about integrating this with AS, I'd love to hear about it;
I'd especially like to learn how to launch a file dialog box and get a return
from that (folder or file)

--
Steve Rindsberg, PPT MVP
PPT FAQ: www.pptfaq.com
PPTools: www.pptools.com
================================================
Featured Presenter, PowerPoint Live 2004
October 10-13, San Diego, CA www.PowerPointLive.com
================================================
 
S

Steve Rindsberg

Hi Bryan,

This URL has the best explanation that I can give:
<http://google.com/groups?threadm=BD0C946B.E5A9%goldkey74@WarmerThanWa
rmMail.com>

Interesting. Same picture from the 2003 side of the fence, except that it
started getting rickety in 2002 as I recall. It was still there but code that
relied on it, and that had always worked fine, just stopped working.



--
Steve Rindsberg, PPT MVP
PPT FAQ: www.pptfaq.com
PPTools: www.pptools.com
================================================
Featured Presenter, PowerPoint Live 2004
October 10-13, San Diego, CA www.PowerPointLive.com
================================================
 
J

Jim Gordon MVP

Steve,

Sorry to sound pessimistic, but I have no hope that FindFile will ever
return.

It would be great if Mac PPT would add GetOpenFilename from Excel to its
VBA collection as a substitute.

-Jim
 
S

Steve Rindsberg

Jim,
Sorry to sound pessimistic, but I have no hope that FindFile will ever
return.

In my case, it didn't much matter whether it was going to return or not. It
was badly broken in versions I had to support, so I had to write my own
routines to do the bits I'd used it for earlier.

Now it looks like I need to rewrite some of the same stuff to get it working on
Mac. Where's that handy WinAPI when you need it? ;-)

Do you know offhand how to open a file dialog box, let the user choose a file
or files and return the list to the calling app?


--
Steve Rindsberg, PPT MVP
PPT FAQ: www.pptfaq.com
PPTools: www.pptools.com
================================================
Featured Presenter, PowerPoint Live 2004
October 10-13, San Diego, CA www.PowerPointLive.com
================================================
 
S

Steve Rindsberg

Do you know offhand how to open a file dialog box, let the user choose a file
or files and return the list to the calling app?

FWIW:

Dim sFilename as String
sFilename = Mid$(MacScript("choose file"),7)

At least for a single file from wherever the finder wants to point you.
Next project is figuring out how to point it where You Want To Go Today.


--
Steve Rindsberg, PPT MVP
PPT FAQ: www.pptfaq.com
PPTools: www.pptools.com
================================================
Featured Presenter, PowerPoint Live 2004
October 10-13, San Diego, CA www.PowerPointLive.com
================================================
 
B

Bryan Harris

Terrific, Steve, you made my day.

Thanks for the update.

Unrelatedly, in response to Jim, I find it odd that FileFind would be
in the same category as someone's uncle Ned who's in prison. How
could a simple little function have become so sensitive? Did somebody
get fired over it? Did somebody sneak some spyware in there that puts
MS at legal risk? Did somebody write a virus that wiped out half the
MacBU using it? I've noticed in my short life that any time you act
secretive you make people curious, which is probably the opposite of
what they want.

Anyway, Steve's fix seems to work for me, so I'm happy. Hope
everybody else's ending is happy too...

- Bryan
 
S

Steve Rindsberg

Terrific, Steve, you made my day.
Thanks for the update.

Any time.
Unrelatedly, in response to Jim, I find it odd that FileFind would be
in the same category as someone's uncle Ned who's in prison. How
could a simple little function have become so sensitive? Did somebody
get fired over it? Did somebody sneak some spyware in there that puts
MS at legal risk? Did somebody write a virus that wiped out half the
MacBU using it?

If they told us, they'd have to put us away with Uncle Ned.


--
Steve Rindsberg, PPT MVP
PPT FAQ: www.pptfaq.com
PPTools: www.pptools.com
================================================
Featured Presenter, PowerPoint Live 2004
October 10-13, San Diego, CA www.PowerPointLive.com
================================================
 
J

Jim Gordon MVP

Hi Bryan,

Microsoft prefers not to discuss the topic in polite company. Keep in
mind that MacBU simply continues the banishment generated by the Windows
group. Steve pointed out that FindFile began misbehaving in Office XP,
was ostracized completely by 2003, and MacBU had to go along with it in
2004. The exact transgressions remain a mystery. I suspect some tears
were shed.

-Jim
 

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

Top