VERSION 1.0 CLASS
BEGIN
  MultiUse = -1  'True
END
Attribute VB_Name = "s_InfoWordDatabase"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = False
Attribute VB_Exposed = False
Option Explicit

' TODO:
' Public Function GenerateFileName(theTitle$) As String
' Public Function SyncLink(hLink As Word.Hyperlink, iDoc As InfoDocument) As IteratorLinkLaw
' Public Function LoadLinksFrom(target As InfoDocument)
' Public Function ExpressLinks(target As InfoDocument)
' Public Function ExpressDocuments(theType As TLawType, target As Word.Range) As Scripting.Dictionary
' Public Function AddLinkAfter(iLink As ItemLink, nWhereIndex&) As Boolean
' Public Function OpenHyperlink(sAddress$) As Boolean

Private db_ As InfoWordDatabase
Private dbApp_ As API_XLWrapper

Public Function Setup()
  ' Mandatory setup function
  Set db_ = New InfoWordDatabase
  Set dbApp_ = Dev_GetDatabase
  Dim oDatabase As New InfoDatabase: Call oDatabase.Init(dbApp_.Document)
  Call db_.Init(oDatabase)
End Function

Public Function Teardown()
  ' Mandatory teardown function
  Call dbApp_.ReleaseDocument(bSaveChanges:=False)
End Function
