06-19-2013 01:34 AM
Hi,
I tried to use the EmailMerge-Method from the UICorrespondenceManager Class the following way:
--------------------------
Act.Framework.ActFramework ActFr = new Act.Framework.ActFramework();
ActFr.LogOn(xmlPADFile, userName, password);
IUnityContainer container = new UnityContainer();
UICorrespondenceManager UIManager = new UICorrespondenceManager(ActFr,container);
UIManager.EmailMerge();
-------------------------
VISUAL Studio tells me that this is not possible because:
Act.Framework.PermissionDeniedException - the user has no rights to perform this action.
Why?
12-11-2014 12:24 AM - edited 12-11-2014 01:37 AM
At last I used the Mail-method instead of Email-method.
It's more or less the same.
Act.UI.Correspondence.UICorrespondenceManager sendmail= new Act.UI.Correspondence.UICorrespondenceManager(ActFr, container);
sendmail= ActApp.UICorrespondenceManager;
sendmail.MailMerge();
Problem solved for me.
06-19-2013 05:31 AM
Could be a couple of things. The first being the user that you're logging in as doesn't have permission to perform a mail merge the other being that an email client hasn't been setup.
06-24-2013 03:57 AM - edited 02-05-2015 05:56 AM
That problem will be solved if I write instead of
Act.Framework.ActFramework ActFr = new Act.Framework.ActFramework();
ActFr.LogOn(xmlPADFile, userName, password);
IUnityContainer container = new UnityContainer();
UICorrespondenceManager UIManager = new UICorrespondenceManager(ActFr,container);
UIManager.EmailMerge();
this
this.ActApplication.UICorrespondenceManager.EmailMerge();
(
Realising an plugin:
// You use the IPlugin Interface
// a private property of the IPlugin Interface is the ActApplication class
private ActApplication ActApp;
//also the OnUnload method
//which needs the ActApplication class
virtual void OnLoad( ActApplication ActApp )
{
this.ActApp= ActApp;
// now or later you can use all the manager classes which are properties of the ActAplication class e. g.
this.ActApp.UICorrespondenceManager.EmailMerge();
}
....
)
But now I have a new problem.
If I use the EmailMerge method I get the following message:
"The email group contains no pages, please set the CurrentGroup of the the WizardSheet"
Which WizardSheet?
06-28-2013 08:12 AM
12-11-2014 12:24 AM - edited 12-11-2014 01:37 AM
At last I used the Mail-method instead of Email-method.
It's more or less the same.
Act.UI.Correspondence.UICorrespondenceManager sendmail= new Act.UI.Correspondence.UICorrespondenceManager(ActFr, container);
sendmail= ActApp.UICorrespondenceManager;
sendmail.MailMerge();
Problem solved for me.