I'm trying to call this macro to create alerts from the load script:
Function alertCreate () rem create new alert with mail dim docprop, al, no, no2 set docprop = ActiveDocument.GetProperties set al = docprop.Alerts al.Add no = al.Count-1 al.Item(no).Action.Id = "AL04" al.Item(no).Action.SuppressPopup = true al.Item(no).Action.Message.v = "Hello world!" al.Item(no).Action.MailRecipients.Add no2 = al.Item(no).Action.MailRecipients.Count-1 al.Item(no).Action.MailRecipients.Item(no2).v = "email@example.com" al.Item(no).Action.MailSubject.v = "Alert: Hello world!" al.Item(no).Comment = "New alert" al.Item(no).Condition.AllClear = false al.Item(no).Condition.BookmarkId = "BM01" al.Item(no).Condition.Condition.v = "sum(Sales)>Sum(Budget)" al.Item(no).Enabled = true al.Item(no).Triggers.Interactive = true al.Item(no).Triggers.OnPostReload = true ActiveDocument.SetProperties docprop end Function
And then I want to call it from the load script like:
LET b = alertCreate();
The alert is not created after doing a reload. I cannot use the OnPostReload event because I want to use the publisher. My question is, if I finally make this macro work (using the call from the script), later, when running the reload from the publisher, is it going to execute the macro call when the script arrives to this line? Or it will happen the same as when using OnPostReload event?
In oder words, the publisher will not execute any kind of macro in any part of the document: in the load script, in the document events using the trigger<external<run macro...