Start Logos 8 and layout from Word 2016
George T. Kelley
Member Posts: 157 ✭✭
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
Tagged:
0
Comments
-
'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.0