Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Public Sub AddToBatch(Batch, Document)
- 'Dim the variables
- Dim QueueObject, strLayouts
- 'Create the object
- Set QueueObject = AMCreateObject("BCPublisher.MeridianQueue", True)
- 'Open the batch
- QueueObject.BeginBatch
- 'Check the property (set on page in the command) to see which layouts or all to do.
- If Document.AllLayouts Then
- If IsArray (Document.LayoutsNames) Then strLayouts = Join(Document.LayoutsNames,";")
- Else
- strLayouts = Mid(Document.DocumentLayouts,2,Len(Document.DocumentLayouts)-2)
- End If
- 'Register the job with the Queue object pass the layouts with the job.
- If Not (QueueObject Is Nothing) Then
- Call QueueObject.RegisterDocument("","RenderLayouts",Document.ID,,"_RenderLayouts_<" & strLayouts & ">_")
- End If
- 'Commit the batch and close it.
- If Not (QueueObject Is Nothing) Then
- QueueObject.CommitBatch
- QueueObject.Dispose()
- End If
- End Sub
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement