We help IT Professionals succeed at work.

Can VBA open a file using an IP Address?

Bryce Bassett
Bryce Bassett used Ask the Experts™
In my Word VBA toolbars, I use the concept of a "Content Library," where the users sets a location on their local machine or network file share, where all of the resource files such as templates and graphics, for the toolbar are stored.  Once the content library is set, the file path is stored in the user registry where it can be loaded back in and used in future Word sessions without having to be re-set.  A typical content library location might be "G:\My Department\Tools\Content Library"

One of my users for some reason is unable to connect using a drive letter designation, so they asked if they can use an IP Address.  I don't know enough about networking to understand the equivalency between an IP Address and a drive letter network file share.  I suppose if we could determine that "G:\My Department" is equivalent to 999.44.333.11, he could set his content library to something like "\\999.44.333.11\Tools\Content Library."  Would that work?

Any pointers would be appreciated.  Thanks!
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Principal Software Engineer
No.  TCP does not provide a default file structure; it only provides the transmission medium.

A network file share (which can be implemented on both Windows and linux machines) requires an underlying service on the server end to translate file-structured requests.  (A bunch more stuff also gets dragged in, to be sure, to handle things like Windows network name resolution.)
John KorchokProduction Manager

It sounds like you're reinventing the Workgroup Templates feature that's already in Office. This feature allows you to set a network share that is a central repository for Word, Excel and PowerPoint templates. You can set a Workgroup Templates location using an IP address. Here's my article with more information on this feature: Shared Workgroup Templates - Best Practices
Bryce BassettFreelance VBA programmer


Dr. Klahn, that confirms what I was thinking.  An IP address and a file path are apples and oranges.  

John, thanks for the link to your article.  I've used Workgroup Templates location in past solutions.  But in this case my toolbar is not a template per se, but rather a Word "add-in" that is loaded automatically each time Word launches.  That's why it needs to live in the STARTUP folder.  Microsoft refers to this as a "global template" but that's really a misnomer.

Thanks, both, for chiming in.
Bryce BassettFreelance VBA programmer


Thanks again