Try this, I got this from the yahoo groups it works well by Shawn Humphrey on Jun 17, 2009 at 6:43:49 pm
This macro assumes several things: First off, your base page is stored at 501. It then takes the record fields in your database and advances the message number accordingly. It will loop and build pages until it reaches the 'Do until messageNumber' location. All these things can be changed in the macro. You can add and delete templates in the macro depending on how many dblink-ed templates are in your message.
Dim messageNumber
Dim recordNumber
messageNumber = 502
recordNumber = 2
Do until messageNumber = 506
Lyric.Message 501
Lyric.Read
set templatep = ActiveCanvas.Scene.SelectedTemplate(0)
templatep.SetActive
templatep.DBLink.RecordNumber=recordNumber
set templatep = ActiveCanvas.Scene.SelectedTemplate(1)
templatep.SetActive
templatep.DBLink.RecordNumber=recordNumber
set templatep = ActiveCanvas.Scene.SelectedTemplate(2)
templatep.SetActive
templatep.DBLink.RecordNumber=recordNumber
set templatep = ActiveCanvas.Scene.SelectedTemplate(3)
templatep.SetActive
templatep.DBLink.RecordNumber=recordNumber
set templatep = ActiveCanvas.Scene.SelectedTemplate(4)
templatep.SetActive
templatep.DBLink.RecordNumber=recordNumber
set templatep = ActiveCanvas.Scene.SelectedTemplate(5)
templatep.SetActive
templatep.DBLink.RecordNumber=recordNumber
set templatep = ActiveCanvas.Scene.SelectedTemplate(6)
templatep.SetActive
templatep.DBLink.RecordNumber=recordNumber
Lyric.Message messageNumber
Lyric.Record
messageNumber = messageNumber + 1
recordNumber = recordNumber + 1
loop