I work with a document assembly program called XpressDox. I am looking for the parameters needed to add an appointment to Outlook 2010. The following application code which creates an Excel spreadsheet is being provided as an example. I wish to embed a similar code in a template that will create an Outlook appointment.
Sample Code:
«CreateObject(‘ExcelApp’, ‘Excel.Application:’)»
«CreateObject(‘Sheet’,‘ExcelApp:WorkBooks.Add.WorkSheets’,’Item’,1)»
«InvokeMethod(‘Sheet:Range(A1).Select’)»
«SetProperty(‘ExcelApp:ActiveCell.FormulaR1C1’,’Date’)»
«InvokeMethod(‘Sheet:Range(A2).Select’)»
«SetProperty(‘ExcelApp:ActiveCell.FormulaR1C1’,’2013-01-21’)»
«InvokeMethod(‘Excel.Application:ActiveWorkbook.SaveAs’,ExcelFileName)»
«InvokeMethod(‘Excel.Application:Quit’)»
Reference URLs would be appreciated.
The How to automate Outlook from another program article describes the basics. The following articles provide sample code and describe how to create an appointment in Outlook programmatically:
How to: Programmatically Create Appointments
How to: Create an Appointment as a Meeting on the Calendar
How to: Create a Recurring Appointment that Occurs Every 2 Years
How to: Programmatically Create a Meeting Request
Related
I've been tasked with creating a workflow in Dynamics 365 which can send emails (the easy bit). However, the email has a link to the record (also easy using the Record URL(Dynamic) attribute). However, we use Apps in our Dynamics instance and the link generated by the workflow using Record URL(Dynamic) doesn't include the app id and so when users click the link they are taken to Dynamics but are now outside the app.
My question is, is there a supported way to appending the App Id to the Record URL(Dynamic) attribute?
I've already searched for answers to this and cant find any. My solution was to create an Action which takes as input the Record and app ID, appends them and outputs them as an output parameter. This works to be honest, but I'm wondering if I'm reinventing the wheel and there is an easier way to achieve this.
Thanks and hope this helps anyone else with the same issue.
We can get the Application ID from Xrm.Utility.getGlobalContext();
The application ID is one of the properties that returned
var globalContext = Xrm.Utility.getGlobalContext();
globalContext.getCurrentAppProperties().then(
function success(app) { console.log(app.appId); }, function errorCallback() { console.log("Error"); });
For more details refer to Here
While we are waiting for MS to give the OOB option to choose Model driven app Id & embed in Record url of WF, I recommend you to follow Andrew Butenko’s workaround using Ultimate Workflow Toolkit to achieve it with no code.
This is basically using UWT custom step to append App Id with Record url on the fly.
I've created an Outlook extended property for contacts with the REST API described here. This is the relevant JSON payload.
{
"singleValueExtendedProperties": [
{
"id":"String {b06defca-5b03-4ee3-ba80-c5c9f49bea8d} Name MyProp",
"value":"true"
}
]
}
This prop is successfully saved and returned if I request instance of contacts with this extension via REST API.
contacts?$filter=singleValueExtendedProperties/Any(ep: ep/id eq 'String {b06defca-5b03-4ee3-ba80-c5c9f49bea8d} Name MyProp' and ep/value eq 'true')
So far, so good.
But how can I show this extension within the Outlook application, e.g. in Outlook for Mac v16.15 ? I assume, that I can add such an extension as additional column in the list view of all contacts. There are always columns named 'Benutzerdefiniert 1' .. 'Benutzerdefiniert 8' (in english 'User defined'). But nothing. Also nowhere within the huge (and BTW very good) Microsoft Graph docs I found any hint linking from the MS Graph REST API into the Outlook app.
What is necessary to have visible custom Outlook properties managed by the MS Graph REST API ?
Kind regards
Dominik
have you tried using Outlook web addin?
You can create an outlook web addins in order to show the extension properties in outlook like this image below.
inside a Outlook COM Add-in (C#) I was able to retrieve all selected mails inside Outlook like this
var selection = Globals.ThisAddIn.Application.ActiveExplorer().Selection;
List<Outlook.MailItem> outlookMailList = new List<Outlook.MailItem>();
foreach (object mail in selection)
outlookMailList.Add((Outlook.MailItem)mail);
to store the selected mails with some meta data inside a DMS.
Now I would like to do the same with the Javascript API for Office (office.js).
What is the correct entry point here? Because when I select more than one mail inside Outlook the OutlookTab-buttons inside the default ribbon get deactivated.
see also http://bettersolutions.com/javascript-api/hosts/extensionpoint.htm
For retrieving the mail information I have found
selectedMail = Office.context.mailbox.item;
How can I get now the data for all marked mails in Outlook. I expected to have something like
selectedMails = Office.context.mailbox.items;
// OR
selectedMails = Office.context.mailbox.selectedItems;
Does someone know how to retrieve the information which mails were selected to the TaskPane or maybe a CustomPane? Respectively if it is even possible?
Thanks a lot.
Unfortunately Office JS API built for handling a single item. Handling multiple items is not possible.
If this is a new feature you want to include in the future, you may submit a feedback.
https://officespdev.uservoice.com/
Best regards
Is there a way to change the GlobalAppointmentId of an appointment.
I found this property schema:
var globalIdPropertySchema = #"http://schemas.microsoft.com/mapi/id/{6ED8DA90-450B-101B-98DA-00AA003F1305}/00030102";
and I set a new value to it:
Item.PropertyAccessor.SetProperty(globalIdPropertySchema, MY_NEW_ID);
then when I get it using Item.PropertyAccessor.GetProperty I'm getting the new id, but the Item.GlobalAppointmentId is still the original one.
I'm needing this so that my addin can sync appointments using ICS files, our system sends ICS files with a suffix in the iCalendar UID field.
But it's possible to create appointments for our system through the Outlook AddIn, then the ICS file which is send uses the GlobalAppointmentID as the UID field in the ICS file. We store it, but it needs to have our suffix. Any tips?
You will need to completely release the appointment to make sure Outlook reloads it next time.
Do you see the change after you restart Outlook?
I am trying to export a user's calendar from Outlook 2007 to a PST file.
The calendar contains appointment items making use of an obsolete custom form (written in VBS).
This form attempts to retrieve data from a database server that no longer exists, which results in error messages appearing during the export. Eventually, the export hangs and does not complete.
What options do I have as far as methods to work around this problem?
Skipping the appointment items with this error would be acceptable, as long as the balance of non-erroneous appointment items can be exported.
You can either
Filter out appointments with the custom message class by only specifying the standard IPM.Appointment class:
RestrictedItems = MAPIFolder.Items.Restrict("[MessageClass] = 'IPM.Appointment' ")
Or avoid using the Outlook Object Model by using Extended MAPI (C++ or Delphi) or Redemption (I am its author - any language).