06-05-2013 06:19 AM
can anyone help?
I need to programmatically call menu item in ACT!
In the SDK I could not find anything (except for “Sage ACT! Uniform Resource Names”)
If possible, an example in C # or VB to call menu item (for example for “&Mail Merge act-ui://com.act/application/menu/help/mailmerge”)
Thank you in advance
06-05-2013 06:38 AM
There may be a better way to do this other than calling the menu item itself, but instead the function that it performs. Which menu item are you trying to access?
06-05-2013 07:06 AM
I need to send a mass e-mail to selected contacts, but first I have to do some checking.
Contacts are found, a check is made, but how to send a letter I do not know
06-05-2013 08:22 AM
There's a couple of ways to send emails using the API, there is a mail merge method in the UICorrespondenceManage class and a SendEmailtoContact method in UIEmailManager, they both behave as expected but the former requires a ContactList and template as parameters.
Unofortunately, I don't have an example put together using mail merge.
02-28-2015 02:06 PM
03-01-2015 12:35 PM
I've never done it but I'm sure it can be done. The easiest way is probably to just manually fire the event in your code. Enumerate the events, get the one you want (the click event for the menu item you want) and then fire the event.
03-02-2015 07:36 AM
Execute the command.
Here is a routine to extract all the command from Act's menu system.
Private Sub GetACTMenuCommands(ByVal ActApplication As Act.UI.ActApplication) ' Strip out all the URNS from ACT's menu system ' And save them into a file named 'ACTMenus.txt' Dim FS As New IO.FileStream("C:\ACTMenus.txt", IO.FileMode.Append, IO.FileAccess.Write) Dim sw As New IO.StreamWriter(FS) For Each pMenu As Act.UI.Core.CommandBarControl In ActApplication.Explorer.CommandBarCollection("Connected Menus").ControlCollection Dim Parentname As String = pMenu.Text.Replace("&", "").ToUpper For Each SubMenu As Act.UI.Core.CommandBarControl In pMenu.SubItems 'writing text to the newly created file sw.WriteLine("Public Const " + Parentname + "_" + SubMenu.Command.Substring(SubMenu.Command.LastIndexOf("/") + 1) + " As String = QUOTES " + SubMenu.Command + " QUOTES") Dim SubSubName As String = SubMenu.Command.Substring(SubMenu.Command.LastIndexOf("/") + 1) For Each Sub2Menu As Act.UI.Core.CommandBarControl In SubMenu.SubItems 'writing text to the newly created file sw.WriteLine("Public Const " + Parentname + "_" + SubSubName + "_" + Sub2Menu.Command.Substring(Sub2Menu.Command.LastIndexOf("/") + 1) + " As String = QUOTES" + Sub2Menu.Command + "QUOTES") Next Next Next sw.Close() End Sub
Hope this helps
-- Jim Durkin
03-02-2015 12:09 PM