API functions: get file name and path

W

ward

Hello,

I've once run into a few API functions which made it very
easy to extract (among other things) the file name and the
file path from a full filename (e.g. c:\temp\document.txt).

I don't remember which API functions it were, and i don't
find them back using google.

I know you can make these functions yourself, and there's
lot of examples of this on the net, but i'm specifically
looking for the API calls.

Anyone who knows what they are?

thanks
Ward
 
J

Jonathan West

ward said:
Hello,

I've once run into a few API functions which made it very
easy to extract (among other things) the file name and the
file path from a full filename (e.g. c:\temp\document.txt).

I don't remember which API functions it were, and i don't
find them back using google.

I know you can make these functions yourself, and there's
lot of examples of this on the net, but i'm specifically
looking for the API calls.

Anyone who knows what they are?

Go to www.mvps.org/vb/. Click on the "Samples" link and then download the
FileInfo.zip sample. It contains a class module which does all these sorts
of things using the API functions. You can import the class directly into a
Word VBA project, or if you prefer you can look at the code and see how it
uses the API functions.
 
J

Jay Freedman

Jonathan said:
Go to www.mvps.org/vb/. Click on the "Samples" link and then download
the FileInfo.zip sample. It contains a class module which does all
these sorts of things using the API functions. You can import the
class directly into a Word VBA project, or if you prefer you can look
at the code and see how it uses the API functions.

An alternative is the WordBasic.FileNameInfo$() function, described at
http://www.mvps.org/word/FAQs/MacrosVBA/WordBasicCommands.htm.
 

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