Bryan Carbonnell
carbonnb at sympatico.ca
Tue Feb 4 10:48:00 CST 2003
On 4 Feb 2003 at 8:30, Rocky Smolin - Beach Access S wrote: > In order to turn off the print button on the file menu I used the > CommandBar object which required the Office Library. I have Version > 10.0. My customer, however, has Version 9.0. He doesn't have 10.0. > I don't have 9.0. So now in the update we have to uncheck the 10.0 > (missing) library, and check the 9.0 library. Awkward phone support at > best. > > What's the best way around this? Can I get 9.0? Or can he get 10.0? > Or what? They're running Office 2000. Pro, I believe. Rocky, You can try something like this: Dim ref As Reference For Each ref In Application.References 'Is the reference Broken and Office's? If ref.IsBroken = True And ref.Name = "Office" Then 'Yes, so remove it References.Remove ref End If Next 'Add the reference for Office 9.0 from the GUID Application.References.AddFromGuid "{2DF8D04C-5BFA-101B- BDE5-00AA0044DE52}", 2, 1 This is all theory, since I don't have Office 10 (XP) to test on. -- Bryan Carbonnell - carbonnb at sympatico.ca There are two ways to write bug-free code; only the third way works.