Tutorial on Automating Logos4+ with ComApi in VBA
I searched the internet on automating the ComApi in VBA/VBS with little results. The best samples is mostly in C/C++ or something. Here is something that may be of interest and help. If anyone can provide some code samples it would be appreciated.
Comments
Nice tutorial! I like the way you put it together. I haven't looked at all the code samples in depth, just flipped through and ran a few of them. Looks very useful and very nicely put together.
Randy, can you give a video demo?
Sure. Here's a real quick screencast of the some of the power point tutorial. You may have to pause to examine some of the screens in more depth.
Programming the ComApi starts with a workable Knowledge of how Objects attach to each other. Here is my interpretation of the ObjectModel ApiVersion 3. If for any reason I made a mistake on this map, please inform me to make the corrections. If you follow the links and info on this map you should be well away on interfacing with Logos. Start at the Left Node "StartUp" and follow the map to the right. Be carefull in using recursive programming on the LogosDataTypeReference because it returns properties containing LogosDataTypeReference (See the Green nodes).
What is this bit about "This Tutorial requires LogosCom.exe"?
There is no such file in all of Logos. The executable file for Logos is called Logos.exe.
Yes, that is true in a way. But technically, LogosCom.exe is the ComApi Type Library of Logos. When you add a Reference to the "Logos Bible Software 4 Type Library" in a VBA Project, it is actually pointing to the ActiveX (LogosCom.exe) on your harddrive at %your Logos installation folder% \System\LogosCom.exe and not Logos.exe. Without the Type Library you can't interface with Logos.exe
If for any random reason VBA or your Development Environment of choice says "Can't create ActiveX" you will know that this file either doesn't exist, is not properly registered or you do not have the right security privalages on the file or its directory structure. It's good to know this when working with the ComApi. I encountered this error several times in VBA, VBScript, JScript and .NET 2010 Express Edition on Win 7 and 8.
I hope this explains the use of the filename LogosCom.exe