Advertisement
Guest User

BCPublisher

a guest
Nov 1st, 2017
77
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. Public Sub AddToBatch(Batch, Document)
  2.     'Dim the variables
  3.     Dim QueueObject, strLayouts
  4.     'Create the object
  5.     Set QueueObject = AMCreateObject("BCPublisher.MeridianQueue", True)
  6.     'Open the batch
  7.    QueueObject.BeginBatch
  8.     'Check the property (set on page in the command) to see which layouts or all to do.
  9.    If Document.AllLayouts Then
  10.         If IsArray (Document.LayoutsNames) Then strLayouts = Join(Document.LayoutsNames,";")
  11.     Else
  12.         strLayouts = Mid(Document.DocumentLayouts,2,Len(Document.DocumentLayouts)-2)
  13.     End If
  14.     'Register the job with the Queue object pass the layouts with the job.
  15.     If Not (QueueObject Is Nothing) Then
  16.         Call QueueObject.RegisterDocument("","RenderLayouts",Document.ID,,"_RenderLayouts_<" & strLayouts & ">_")
  17.     End If
  18.     'Commit the batch and close it.
  19.    If Not (QueueObject Is Nothing) Then
  20.         QueueObject.CommitBatch
  21.         QueueObject.Dispose()
  22.     End If
  23. End Sub
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement