Hi!

I have a problem where I reference som dll-files that are available when I
work connected to the network, but not when I work off line. Hence when I
use Word off line I get an error.

Any ideas? Trap it through on error? Something else?

Best
/e

Re: dealing with missing references by Shauna

Shauna
Mon Dec 04 16:30:33 CST 2006

Hi Eric

It's not really possible to trap this as an error, because it's a
compile-time error, not a run-time error. What I do in this circumstance is
to use late binding. (See
http://www.word.mvps.org/FAQs/InterDev/EarlyvsLateBinding.htm for info) with
something like this:

Dim clsMyThing As Object

On Error Resume Next
Set clsMyThing = CreateObject("DLLName.ClassName")
On Error GoTo 0

If clsMyThing Is Nothing Then
'DLL is not available
Else
clsMyThing.MyMethod whatever
End If

Set clsMyThing = Nothing

Hope this helps.

Shauna Kelly. Microsoft MVP.
http://www.shaunakelly.com/word


"eric" <eric@hotmail.com> wrote in message
news:ul0Wq19FHHA.536@TK2MSFTNGP02.phx.gbl...
> Hi!
>
> I have a problem where I reference som dll-files that are available when I
> work connected to the network, but not when I work off line. Hence when I
> use Word off line I get an error.
>
> Any ideas? Trap it through on error? Something else?
>
> Best
> /e
>