permanent/programmatic changes to VBA Project References

  • Thread starter Thread starter akh2103
  • Start date Start date
A

akh2103

Hey--Is there any way to permanently select certain references from the
VB Project library? I want to be able to always reference microsoft
word at all times in VB, rather than have my users tell the VB editor
that they would like to reference word...

Thanks,
Abe
 
Have you thought about using late binding instead of early binding? It's
very easy to implement, but could cause problems if the user has an older
version.

Just change all your DIM references for the word object to Object.

ex.
Dim Doc as word.document
To
Dim do as object

HTH
Cal
 
Forgot to explain why:-)
When using late binding you don't need to use the reference at all. VB will
automatically pick up the most recent associated object based on the
createObject().
 
Why do you think latebinding would have problems with older versions. That
is half the reason to use latebinding. What would cause problems is if you
use features not supported in the older version - but that has nothing to do
with latebinding.
 
I guess if there would be problems regardless of whether you used late or
early binding, then yes, I guess it wasn't just unclear, but misleading.
 
I agree that my incomplete explanation could be misleading to someone who has
never used late binding before. The explanation on resolving the problem the
OP encountered is still valid. I will ensure that the next post I make
within this board is more complete, so there is no confusion on the OP's
part. Once you pointed out the weakness in my explanation on the first post,
what exactly was the second one for? Just for the general, I'm right, you
are wrong? Is that the normal behaviour and attitude of MVP's? I'm here on
a volunteer basis just as you are trying to help people.
 
Merely clarifying that the two are unrelated which you still left as
ambiguous. Perhaps it could be stated differently.

If you want to discuss it, my email isn't hidden.

--
Regards,
Tom Ogilvy
(e-mail address removed)
 

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

Back
Top