Outlook PST export fails because of custom form errors? - vbscript

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).

Related

Dynamics CRM 2016 modify list of activities views

I am very new to MS Dynamics. I am using dynamics CRM 2016 and I need to remove, in the activities page, the views about entities that I am not using such as Campaign Response, Campaign Activity, etc.
I do not see them in the list of views of the Activity entity in my solution, so I cannot remove them from there, am I missing something? Is there a way to remove those views?
Its possible. I found the way to do it finally after just 3 days of research.
Open your CRM web in XRM Tool kit (download if not having it)
XRM toolkit access your org using url and login. Assuming you have privilege access.
Load all web resources and scroll down to find "activitypointer_ribbon_home.js"
Add below lines of code into the file,
finally Save and publish to make it available for all users. Whoa.. it works like charm !!!
hideactivitiesview() // call under onload of xrm page; comes in default script of this file
function hideactivitiesview()
{
var viewSelector = $('#crmGrid_SavedNewQuerySelector')[0];
if(viewSelector)
{
$(viewSelector).click(function(){
var _activity = $('#ViewSelector_activity')[0]; //get this id from DOM using F12
if(_activity)
$(_activity).hide();
});
}
}
Unfortunately you cannot hide/remove those.
Reason: They are not usual views, they are part of System tailored Activity entity family (Activity, Activity Pointer, Activity Party, Custom Activity types, etc).
If you see any Activity entity properties, the checkbox 'Display in Activity Menus' is checked & disabled. This settings is being used for navigation, views, filters, etc.
Even while creating custom activity, this option is enabled & if you forget to check it, that particular Custom Activity type will be hidden from everywhere wherever you are using its siblings (Email, Fax, etc)
If its unchecked, Even Associated view will not be showing this activity under it's regarding Parent record, which is failing the main reason why we are using CRM & activity relationship.
In a nutshell, this setting once enabled, cannot be undone. The activity cannot be distinguished/disabled using security role, because all are of same bucket.
Maybe you can try some unsupported customizations using DOM explorer in javascript & hide it, which I don't recommend. PowerObjects blog talk about renaming it to something to avoid users using it & other options.

Is it possible to get data of several selected mails inside an outlook web add-in app?

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

Outlook AddIn - change the GlobalAppointmentId

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?

Parameters needed to create Outlook Appointments

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

get attachment id from redemption or RDO MAil

I'm developping an outlook addIn using C# and I need to get attachment id from redemption or RDO MAil.
how's that?
Thank you
Outlook attachments (unlike messages) do not have unique ids since they only exist in the context of their parent messages.
PR_ATTACH_NUM property is used to open attachments - http://msdn.microsoft.com/en-us/library/office/cc841969.aspx.
But that property is not guaranteed to stay the same when a message is opened. More than that, the value of the PR_ATTACH_NUM property can differ depending on whether you retrieve it from the attachment table or from the attachment itself. Below is example from OutlookSpy (I am its author):
What exactly are you trying to do?
I was trying to replace attachment with a link in async callback method and I needed to detect which attachment to replace.
I used as flag the contentID of the Interop.Redemption.RDOAttachment Object and it worked fine, Thank you .

Resources