Generates a journal from a recurring template.
<IHsvJournalsEx>.GenerateRecurring lScenario, lYear, lPeriod, lTemplateID
The following subroutine creates a recurring journal. The subroutine takes the member IDs of the journal’s Scenario, Year, and Period dimension members and the label of the recurring template. HsvJournals.GetJournalTemplateItemID gets the template’s ID, which is then passed to GenerateRecurring.
Sub createRecurJnl(lScen As Long, lYear As Long, _ lPer As Long, sTemplate As String) Dim cJournals As HsvJournals, cJournalsEx As IHsvJournalsEx Dim lTemplateId As Long Set cJournals = g_cSession.Journals Set cJournalsEx = g_cSession.Journals lTemplateId = cJournals.GetJournalTemplateItemID(sTemplate) cJournalsEx.GenerateRecurring lScen, lYear, lPer, lTemplateId End Sub