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, but widespread attacks make patching prudent. Go ahead and patch, but watch out for potential problems. |
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, 9 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
-
Trying to backup Win 10 computer to iCloud
by
SheltieMom
3 hours, 41 minutes ago -
Windows 11 Insider Preview build 26200.5570 released to DEV
by
joep517
13 hours, 27 minutes ago -
Windows 11 Insider Preview build 26120.3941 (24H2) released to BETA
by
joep517
15 hours, 15 minutes ago -
Windows 11 Insider Preview Build 22635.5305 (23H2) released to BETA
by
joep517
15 hours, 16 minutes ago -
No April cumulative update for Win 11 23H2?
by
Peobody
17 hours, 34 minutes ago -
AugLoop.All (TEST Augmentation Loop MSIT)
by
LarryK
15 hours, 47 minutes ago -
Boot Sequence for Dell Optiplex 7070 Tower
by
Serge Carniol
1 day, 6 hours ago -
OTT Upgrade Windows 11 to 24H2 on Unsupported Hardware
by
bbearren
1 day, 10 hours ago -
Inetpub can be tricked
by
Susan Bradley
1 day, 11 hours ago -
How merge Outlook 2016 .pst file w/into newly created Outlook 2024 install .pst?
by
Tex265
4 hours, 19 minutes ago -
FBI 2024 Internet Crime Report
by
Alex5723
1 day, 14 hours ago -
Perplexity CEO says its browser will track everything users do online
by
Alex5723
1 day, 2 hours ago -
Login issues with Windows Hello
by
CWBillow
2 days, 1 hour ago -
How to get into a manual setup screen in 2024 Outlook classic?
by
Tex265
1 day, 13 hours ago -
Linux : ARMO rootkit “Curing”
by
Alex5723
2 days, 12 hours ago -
Employee monitoring app leaks 21 million screenshots in real time
by
Alex5723
2 days, 12 hours ago -
Google AI is now hallucinating idioms
by
Alex5723
2 days, 13 hours ago -
april update
by
69800
17 hours, 47 minutes ago -
Windows 11 Insider Preview build 27842 released to Canary
by
joep517
2 days, 14 hours ago -
Quick Fix for Slowing File Explorer
by
Drcard:))
2 days, 14 hours ago -
WuMgr not loading?
by
LHiggins
1 day, 10 hours ago -
Word crashes when accessing Help
by
CWBillow
2 hours, 5 minutes ago -
New Microsoft Nag — Danger! Danger! sign-in to your Microsoft Account
by
EricB
2 days, 14 hours ago -
Blank Inetpub folder
by
Susan Bradley
2 days, 11 hours ago -
Google : Extended Repair Program for Pixel 7a
by
Alex5723
3 days ago -
Updates seem to have broken Microsoft Edge
by
rebop2020
2 days, 11 hours ago -
Wait command?
by
CWBillow
2 days, 18 hours ago -
Malwarebytes 5 Free version manual platform updates
by
Bob99
3 days, 7 hours ago -
inetpub : Microsoft’s patch for CVE-2025–21204 introduces vulnerability
by
Alex5723
3 days, 14 hours ago -
Windows 10 finally gets fix
by
Susan Bradley
3 days, 22 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.