Start Logos 8 and layout from Word 2016

Page 1 of 1 (2 items)
This post has 1 Reply | 3 Followers

Posts 129
George T. | Forum Activity | Posted: Wed, May 1 2019 7:34 AM

I was able to start Logos 7 with layout (like Sermon Layout) from a command lines, from within a Word Macro, which does not work with Logos 8. I have tried several things, but without any success. Anybody have a clue how this can be done?

GeorgeT

Posts 303
PJ | Forum Activity | Replied: Wed, May 15 2019 12:23 PM
'Syntax: OpenLayout([LayoutName])
'Test this code from the VBA Immediate window with the following line of code:
'OpenLayout()
'...or...
'OpenLayout("Sermon Layout")

Sub OpenLayout(Optional pLayoutName As String = "Sermon Layout") 'I use latebinding for illustration purposes Dim Logos As Object Dim Launcher As Object On Error Resume Next 'Try to get the running instance of logos first Set Logos = GetObject(, "LogosBibleSoftware.Application") 'If it is not running, try to execute it using the Logos Launcher If Err.Number = 429 Then Set Launcher = CreateObject("LogosBibleSoftware.Launcher") Launcher.LaunchApplication 'Wait for the App to load While Logos Is Nothing Set Logos = Launcher.Application Wend End If On Error GoTo ErrHandler 'Try to load the Layout by name If Logos.LoadLayout(pLayoutName) = False Then MsgBox "Can't Load Layout:" & pLayoutName End If Exit Sub ErrHandler: 'Trap unexpected errors MsgBox Err.Description Err.Clear End Sub


If this is what you are looking for I hope it works fine.
If not, explain a bit more with an example what you did previously.
Page 1 of 1 (2 items) | RSS