Today's date in outlook template - outlook

Is there any way to insert today's date in outlook's template subject or body? Such that whenever I open the saved template, today's date should be automatically shown in subject and body.
Is there any inbuilt function? something like Date() ?

Nope. Templates don't provide anything for that.
Instead, you may consider creating a VBA macro or add-in. In the NewInspector or Active event you can check out the CurrentItem property of the Inspector class - whether it is a new item and created using a template. Typically new Outlook items don't have the EntryID property set. And then insert the current date wherever you need.

Related

Outlook 2016 - Modify Appointment Window

Wondering if there is a way to modify the Appointment window in outlook 2016 to add new fields?
A resource field that would be a drop down menu containing
different alphanumeric text field selections.
A Numeric data type entry field.
A Text data type entry field.
Thanks in advance.
Yes, you can create a custom form based on the IPM.Appointment class or create a form region associated with that class. See: https://msdn.microsoft.com/en-us/vba/outlook-vba/articles/customizing-form-pages-and-form-regions.
You can also host your UI in a custom Windows Form on a custom Task Pane adjoining the Appointment window by using a .NET add-in.

Windows Phone Date Picker Submit event

I have a native Date Picker in a windows phone app.
Using the DateChanged event I can perform actions when the user submits.
DatePicker.DateChanged += (o, args) =>
{
var date = args.NewDate;
// Do something with it
}
The problem I am facing is the event is not triggered if the user submits the date picker without changing the date.
Default value is set to today's date which makes it impossible to select this date.
Does anyone know how I can allow the user the select this date and perform actions after ?
Thanks for your help :)
There is no particular way of getting an event fired when the date is not changed. As you said the date picker by default selects the current date, you can perform the action you want to if the user selects today's date in the OnNavigatedTo, Loaded, or DatePicker_Loaded event. A better way to do so is providing the DatePicker an invalid date something like 1Jan1947, this ways the user has to change the date else it'll be invalid. Also if you write the code you want on dateChanged event, it'll fire automatically as when the DatePicker is Loaded it sets the date from default to the current date.
What I would recommend
is to use a binding property to hold a value and then performing the
operations onPropertyChanged event of that property. This ways your
logic is independent of your datePicker and you could write events
for each time the dateTime property changes.
Do remember to bind the datePicker's date property to the DateTime
property in a TwoWay Mode and an UpdateSourceTrigger of
PropertyChanged. This ways when you change the property from code
behind the data would reflect in the datePicker and when you change
the value in the datePicker, the data would be reflected in the code
behind as well

Outlook - how to access appointment attribute COMPANY

The Outlook data model for Appointments includes an attribute called COMPANY. I cannot find where to enter this information anywhere. If I create a new appointment, I can enter start time, stop time, location, etc. It appears I cannot enter the data for COMPANY. Is this accurate? Why have an attribute which cannot be used? How do I use it? Surely I don't have to build a custom Outlook form, do?
Thanks,
GS
I assume you are referring to the AppointmentItem.Companies Property:
Returns or sets a String representing the names of the companies
associated with the Microsoft Outlook item. This is a free-form text
field. Read/write.
This field is not available in the default Appointment form. You would need to customize the existing form or design your own that includes this field.
You asked:
Why have an attribute which cannot be used?
You can use it -- see above.

Add onchange event to a "locked" field in Dynamics CRM 4

I'm customising Dynamics CRM 4 and would like to modify the Form for the Case entity to add some JavaScript to the onchange event for the Knowledge Base Article lookup field (kbarticleid_ledit). However, when I click Change Properties for that field I get an error message:
This field belongs to a locked section and cannot have its properties modified.
How can I get around this and edit it? Is there a workaround similar to customizing the Article view? Or can I hack the DB somehow to "unlock" that field?
You could also have added onchange code from the onload event. For example, if the locked field's id was lockedField, you could do something like this.
var field = crmForm.all.lockedField;
if (field)
field.attachEvent('onchange', onChangeEventHandler);
function onChangeEventHandler()
{
// do something
}
OK, I figured it out - posting here in case anyone else runs into the same problem. You need to export the customizations for the Case entity to XML and edit the XML. You can "unlock" the section by finding the corresponding element in the XML and changing the attribute locklevel="1" to locklevel="0".
However, unlocking it didn't help me in editing the onchange event code. CRM already had some code for that event and when I added my code in the UI it added a second "onchange" event to the XML! So I was forced to manually edit the code in the XML (with proper XML-encoding, of course) and then re-import and publish the customizations.

Customizing Outlook and Exchange to add new fields to meetings + querying from Exchange from custom app, is this possible?

Is it possible to customize the window used in Outlook to type in meetings (calendar tab) to add new fields to it ?
That data would be stored in Exchange, then queried by another app that would do something with it.
My problem is to see how I could affect the meeting edit dialog as it is now, to add my new fields.
Any ideas ?
If all you want to do is add some fields to the BOTTOM of the Appointment item inspector, then you can do that very easily with VSTO. It's called a custom outlook form region.
See here: http://msdn.microsoft.com/en-us/library/bb157865.aspx
However, if you want to change elements in the base inspector form itself then that's much more difficult, and involves significantly more work. I don't have a complete answer for that.
You could do this pretty easily with custom forms.
Just derive from the "ipm.appointment" appointment form and add you fields and logic to validate and save those fields as user properties on the meeting item
You can then attach to exchange using RDO or OOM to call back the properties off the meeting items.
you can then publish the form to you whole organisation if you want and over righ the default with soem reg key changes.
or
you can do as above and create yourself an addin using vsto.

Resources