G
Guest
Early Binding vs Late Binding
After spending a great deal of time on this topic I thought I had a handle
on it, but in review I find myself as confused as I ever was. I have read so
many conflicting writeups that I am at a loss. So let me describe what I am
doing and please someone set me straight!
I have an Access 2003 app that automates with Word, Excel, and Outlook. I
have deemed that Office 2000 is my minimum but I want it to work well with
Office XP, Office 2003 and upward for the foreseeable future. The app will be
loaded with 2003 runtime if required. For sake of this discussion let’s focus
on Word however I use a similar approach all three.
In my VBA, I reference Microsoft Word 9.0 object library (Word 2000). In my
code when I use
Private objWordApp As Word.Application
The reason I don’t use “As Object†is because I want to reference some word
constants such as Word.Range, Word.Table, objwordapp.wdOpenFormatAuto. I am
happy to define these myself but I would need someone to point the way on how
to do this.
Set objWordApp = GetObject("", "Word.Application")
I have tested this on all platforms available ie. Office 2000, Office XP,
and Office 2003 and it all seems to work just fine. The question being, am
I using early binding, late binding, or some convoluted methodology of both?
Is there a downside to my approach? I don’t really care what approach I use
so long as it works on all platforms specified.
Help Mr.(or Ms.) Wizard – Help Me Please!
After spending a great deal of time on this topic I thought I had a handle
on it, but in review I find myself as confused as I ever was. I have read so
many conflicting writeups that I am at a loss. So let me describe what I am
doing and please someone set me straight!
I have an Access 2003 app that automates with Word, Excel, and Outlook. I
have deemed that Office 2000 is my minimum but I want it to work well with
Office XP, Office 2003 and upward for the foreseeable future. The app will be
loaded with 2003 runtime if required. For sake of this discussion let’s focus
on Word however I use a similar approach all three.
In my VBA, I reference Microsoft Word 9.0 object library (Word 2000). In my
code when I use
Private objWordApp As Word.Application
The reason I don’t use “As Object†is because I want to reference some word
constants such as Word.Range, Word.Table, objwordapp.wdOpenFormatAuto. I am
happy to define these myself but I would need someone to point the way on how
to do this.
Set objWordApp = GetObject("", "Word.Application")
I have tested this on all platforms available ie. Office 2000, Office XP,
and Office 2003 and it all seems to work just fine. The question being, am
I using early binding, late binding, or some convoluted methodology of both?
Is there a downside to my approach? I don’t really care what approach I use
so long as it works on all platforms specified.
Help Mr.(or Ms.) Wizard – Help Me Please!