|
-
Mar 13th, 2006, 11:20 PM
#1
Thread Starter
New Member
Reference Libraries
Hi,
I'm developing an Add-In for microsoft office that will potentially
be used by many people. The Add-in needs to be compatible across
many versions of Microsoft Office products e.g. Office 97 onwards
(Although if it has to be office 2000 that is not so bad). It also
uses Word, Excel and Powerpoint.
I'm grapling with how to include Reference libraries, e.g. I know
how to manually include them in projects e.g. from the project
references choose the appropriate library e.g. "Microsoft Excel 11
Object Library", "Microsoft Access 8.0 Object Library" etc, etc.
I have developed the Add-in to work with the Office 97 reference
files, therefore it should be compatible (even if outdated) with
later versions of these files.
My first question is; If I compile the Add in with the latest
version of the reference files e.g. "Microsoft Excel 11 Object
library" (Office 2003), will that be backward compatible with
someone who has Excel '97 "Microsoft Excel 8.0 Object Library" on
their pc,
or
do I need to compile a separate version of the software for every
possible combination of office software that could be used on an end
users pc. aaaaahhhh!, please tell me this is not an option....
or
is there a way I can dynamically assign a reference library at
install time....
Any help would be appreciated, even point me in the direction of a
good book (I've searched for plenty, but can't seem to find
much).... maybe something on relaxation (attempted humour).....
Thanks in advance.
Peter Lilley
-
May 16th, 2006, 11:08 PM
#2
New Member
Re: Reference Libraries
Anyone? Anyone?
I need the smae sort of thing anwered.
-
May 17th, 2006, 10:29 PM
#3
Re: Reference Libraries
You need to use Late Binding. You can not set a reference to any other the versions.
For ex...
VB Code:
'Add a reference to MS Excel xx.0 Object library
Private Sub Command1_Click()
dim oApp As Excel.Application
Set oApp = New Excel.Application
oApp.Visible = True
End Sub
'Late Binding:
'Do NOT add any references to any Office apps.
Private Sub Command1_Click()
Dim oApp As Object
Set oApp = CreateObject("Excel.Application")
oApp.Visible = True
End Sub
VB/Office Guru™ (AKA: Gangsta Yoda™ ®)
I dont answer coding questions via PM. Please post a thread in the appropriate forum. 
Microsoft MVP 2006-2011
Office Development FAQ (C#, VB.NET, VB 6, VBA)
Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
If a post has helped you then Please Rate it! 
• Reps & Rating Posts • VS.NET on Vista • Multiple .NET Framework Versions • Office Primary Interop Assemblies • VB/Office Guru™ Word SpellChecker™.NET • VB/Office Guru™ Word SpellChecker™ VB6 • VB.NET Attributes Ex. • Outlook Global Address List • API Viewer utility • .NET API Viewer Utility •
System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6 
-
May 18th, 2006, 07:29 PM
#4
New Member
Re: Reference Libraries
Thanks Guys. I took the short cut. I put my VB code on a machine that had VB and EXCEL 97 made the link and compiled the code. This is not a distributable program but rather a one of a kind application that will only have to run on this one PC.
-
May 18th, 2006, 07:37 PM
#5
Re: Reference Libraries
Yup, that will work too.
Just another way to skin a cat. 
VB/Office Guru™ (AKA: Gangsta Yoda™ ®)
I dont answer coding questions via PM. Please post a thread in the appropriate forum. 
Microsoft MVP 2006-2011
Office Development FAQ (C#, VB.NET, VB 6, VBA)
Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
If a post has helped you then Please Rate it! 
• Reps & Rating Posts • VS.NET on Vista • Multiple .NET Framework Versions • Office Primary Interop Assemblies • VB/Office Guru™ Word SpellChecker™.NET • VB/Office Guru™ Word SpellChecker™ VB6 • VB.NET Attributes Ex. • Outlook Global Address List • API Viewer utility • .NET API Viewer Utility •
System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6 
-
May 25th, 2006, 05:23 AM
#6
Thread Starter
New Member
Re: Reference Libraries
Thanks RobDog888 & GrilleGuy, I know I posted this way back in Feb (on multiple forums) and still didn't have an answer.
Much appreciated....
-
May 25th, 2006, 08:42 PM
#7
New Member
Re: Reference Libraries
All Kudos go to RobDog888
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|