Usability of document "on" or "off" network

K

KenderFaith

Hi there:

Our Word templates are saved on our server and are programmed with code that
(when a document based on the template is started or opened) gathers
information from Excel files located on our server, then uses
ContentControlOnExit to populate the appropriate content controls in the
active document (although the information could be entered manually for each
document, the programming saves us SO much time and effort).

It all works brilliantly - EXCEPT if anyone tries to work on the document
(e.g. on their laptop from home) without a connection to our server, they get
errors, because the required server locations cannot be found.

What I've been trying to do is find a quick and dirty way to check for the
network location when a document is opened, and if the network location is
not found, disable the programming in the document. That way, they can use a
document based on a template whether or not they have a network connection...

Any suggestions? I've tried numerous ways of handling this, and am stumped
after hours and hours of trial and error, error, error...
 
S

StevenM

To: KenderFaith,

I'm not for sure what you're asking, and I have no knowledge about using a
server. So perhaps I'm off base here. But if all you need to do is check to
see if your code has access to your server, then why can't you use the Dir
function? All you need is to do is find a file which will always be on the
server, and then use the Dir function to see if it exists. If it does you
have connection to the server. If not, you don't. Frankly, anytime you try to
open a file, you should check to see if it exists first before opening it.

Steven Craig Miller
 

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