I need to reference the dll C:Program FilesGeneraliBox.dll from a global template. No problem doing so at design time. But that means distribution of the dll to all users (1000+) of the global template. And the dll is only used by the 3 percent of the users with acces to a particular application. So I wonder if it is possible to set the reference “on the fly” when Word starts (module AutoExec, Sub Main in the global template), depending on the existence of that dll on the PC.
![]() |
Patch reliability is unclear. Unless you have an immediate, pressing need to install a specific patch, don't do it. |
SIGN IN | Not a member? | REGISTER | PLUS MEMBERSHIP |
-
Set reference ‘on the fly’ (WinXP/Word2003 NL)
Home » Forums » AskWoody support » Productivity software by function » Visual Basic for Applications » Set reference ‘on the fly’ (WinXP/Word2003 NL)
- This topic has 8 replies, 2 voices, and was last updated 19 years, 10 months ago.
Viewing 0 reply threadsAuthorReplies-
WSHansV
AskWoody LoungerJuly 12, 2005 at 9:01 am #959255If you set a reference to the Microsoft Visual Basic for Applications Extensibility 5.3 library, you can manipulate references in code. Put the following macro in a module; you can run it to test if it works correctly, and if so, you can call it from the AutoExec macro.
Sub TestRef()
Const strLib = “C:Program FilesGeneraliBox.dll”
If Not Dir(strLib) = “” Then
ThisDocument.VBProject.References.AddFromFile strLib
End If
End Sub -
WSJanB
AskWoody Lounger -
WSJanB
AskWoody LoungerJuly 14, 2005 at 8:26 am #959808(Edited by JanB on 14-Jul-05 10:26. edited some typo’s and added note)
The code works fine, but that’s not enough to solve the problem. Removing the manually applied reference to the ibox.dll is causing a “Compile error in a hidden module” right at the start of Word. Delving into the code of a co-worker who is now on vacation, I learned that the cause is a line “Public gcDFC As New DfExSession” in the declarations section of a module (DFC = Documentum Foundation Class; Documentum is a document management system).
So I’m trying to switch from this early binding to late binding by replacing the declaration line with “Public gcDFC As Object” and in Sub Main adding the line “gcDFC = CreateObject(“iBox”), but that fails with “Error 429, ActiveX-component cannot create object” (something like this, translated from Dutch). iBox is the name with which the dll presents itself in the Tools | Reference… dialog. As I’m not very familiar with this late binding, I’m stuck. What am I doing wrong?Note
As I understand it, iBox is a sort of “communications layer” between VBA en DFC, also containing routines to add, edit & delete registry settings in the Documentum brache. -
WSHansV
AskWoody LoungerJuly 14, 2005 at 8:27 am #959810If the early binding declaration is Public gcDFC As New DfExSession, the late binding equivalent is
Public gcDFC As Object
Set gcDFC = CreateObject(“iBox.DfExSession”)or perhaps
Set gcDFC = CreateObject(“DfExSession”)
You must change all declarations of objects associated with the iBox library to As Object.
Also look out for symbolic constants defined in the iBox library, you must replace them with their values.
-
WSJanB
AskWoody Lounger -
WSJanB
AskWoody LoungerJuly 21, 2005 at 6:35 am #961286I still cannot get this to work. Steps taken:
– I made sure the dll is registered. I found it in the Registry under HKEY_CLASSES_ROOTCLSID{number}. In key ProgID, (Standard) has value iBox.DfExSession.
– In a standard module, I put the declaration Public gcDFC As Object
– In module AutoExec, Sub Main, I check if the iBox.dll is present in the correct path
– If so, the line Set gcDFC = CreateObject(iBox.DfExSession) is executed
– all code referring to gcDFC is in the Sub cmdOK_Click of a simple form with two textboxes to input username and password and an OK button
– this form is only shown if the iBox.dll is present (only a few users, including my developer-PC)The line Set gcDFC = CreateObject(iBox.DfExSession) causes runtime error 438: “This property or method is not supported by this object”. Any ideas?
-
WSHansV
AskWoody Lounger -
WSJanB
AskWoody Lounger
-
-
-
-
Viewing 0 reply threads -

Plus Membership
Donations from Plus members keep this site going. You can identify the people who support AskWoody by the Plus badge on their avatars.
AskWoody Plus members not only get access to all of the contents of this site -- including Susan Bradley's frequently updated Patch Watch listing -- they also receive weekly AskWoody Plus Newsletters (formerly Windows Secrets Newsletter) and AskWoody Plus Alerts, emails when there are important breaking developments.
Get Plus!
Welcome to our unique respite from the madness.
It's easy to post questions about Windows 11, Windows 10, Win8.1, Win7, Surface, Office, or browse through our Forums. Post anonymously or register for greater privileges. Keep it civil, please: Decorous Lounge rules strictly enforced. Questions? Contact Customer Support.
Search Newsletters
Search Forums
View the Forum
Search for Topics
Recent Topics
-
Acronis : Tracking Chaos RAT’s evolution (Windows, Linux)
by
Alex5723
2 minutes ago -
Turning off OneDrive
by
CWBillow
4 hours, 32 minutes ago -
June 2025 updates are out
by
Susan Bradley
7 minutes ago -
Mozilla shutting Deep Fake Detector
by
Alex5723
14 hours, 49 minutes ago -
Windows-Maintenance-Tool (.bat)
by
Alex5723
11 minutes ago -
Windows 11 Insider Preview build 26200.5641 released to DEV
by
joep517
17 hours, 21 minutes ago -
Windows 11 Insider Preview build 26120.4250 (24H2) released to BETA
by
joep517
17 hours, 23 minutes ago -
Install Office 365 Outlook classic on new Win11 machine
by
WSrcull999
17 hours, 20 minutes ago -
win 10 to win 11 with cpu/mb replacement
by
aquatarkus
9 hours, 13 minutes ago -
re-install Windows Security
by
CWBillow
20 hours, 37 minutes ago -
WWDC 2025 Recap: All of Apple’s NEW Features in 10 Minutes!
by
Alex5723
1 day ago -
macOS Tahoe 26
by
Alex5723
18 hours, 32 minutes ago -
Migrating from win10 to win11, instructions coming?
by
astro46
6 hours, 36 minutes ago -
Device Eligibility for Apple 2026 Operating Systems due this Fall
by
PKCano
9 hours, 4 minutes ago -
Recommended watching : Mountainhead movie
by
Alex5723
9 hours, 48 minutes ago -
End of support for Windows 10
by
Old enough to know better
9 hours, 44 minutes ago -
What goes on inside an LLM
by
Michael Covington
3 hours, 57 minutes ago -
The risk of remote access
by
Susan Bradley
46 minutes ago -
The cruelest month for many Office users
by
Peter Deegan
16 hours ago -
Tracking protection and trade-offs in Edge
by
Mary Branscombe
14 hours, 3 minutes ago -
Supreme Court grants DOGE access to confidential Social Security records
by
Alex5723
1 day, 22 hours ago -
EaseUS Partition Master free 19.6
by
Alex5723
23 hours, 19 minutes ago -
Microsoft : Edge is better than Chrome
by
Alex5723
2 days, 11 hours ago -
The EU launched DNS4EU
by
Alex5723
3 days ago -
Cell Phone vs. Traditional Touchtone Phone over POTS
by
280park
2 days, 15 hours ago -
Lost access to all my networked drives (shares) listed in My Computer
by
lwerman
3 days, 6 hours ago -
Set default size for pasted photo to word
by
Cyn
3 days, 12 hours ago -
Dedoimedo tries 24H2…
by
Cybertooth
3 days ago -
Windows 11 Insider Preview build 27871 released to Canary
by
joep517
4 days, 11 hours ago -
Windows 11 ad from Campaign Manager in Windows 10
by
Jim McKenna
2 days, 3 hours ago
Recent blog posts
Key Links
Want to Advertise in the free newsletter? How about a gift subscription in honor of a birthday? Send an email to sb@askwoody.com to ask how.
Mastodon profile for DefConPatch
Mastodon profile for AskWoody
Home • About • FAQ • Posts & Privacy • Forums • My Account
Register • Free Newsletter • Plus Membership • Gift Certificates • MS-DEFCON Alerts
Copyright ©2004-2025 by AskWoody Tech LLC. All Rights Reserved.