Creating a Downloadable Microsoft Outlook Task [closed] - outlook

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 5 months ago.
Improve this question
Is it possible to have a Microsoft Outlook task that a person could download from a website and open in Microsoft Outlook and then assign to another person?
When I've tried saving a task as a file it won't let me assign it when I open it.

You can create VBA macro or just automate Outlook from your application to get the job done. The Outlook object model provides all the necessary properties and methods for that.
After an Outlook item is downloaded you can use the Application.CreateItemFromTemplate method which creates a new Microsoft Outlook item from an Outlook template (.oft) and returns the new item. New items will always open in compose mode, as opposed to read mode, regardless of the mode in which the items were saved to disk. Read more about that in the How To: Create a new Outlook message based on a template article.
Also you can try using the OpenSharedItem method which opens a shared item from a specified path or URL. This method is used to open iCalendar appointment (.ics) files, vCard (.vcf) files, and Outlook message (.msg) files. The type of object returned by this method depends on the type of shared item opened, as described in the following table.
Finally, keep in mind that Outlook is a singleton which means only one instance of the Outlook application can be run on the system. Whatever you run for opening in Outlook you can handle the NewInspector event which is fired when an item is opened in Outlook.

Related

Custom properties are not being saved immediately to Exchange Server in Outlook desktop 2016

My Outlook web add-in saves emails to an external application.Upon save, it will also write some custom information to exchange server using Office.js's customProps.saveAsync();. So next time the user open the same email, the add-in will look up the properties and if it is not null will remind the user the email has been saved.
Work like a charm in web browser(Office 365).
However in Windows Outlook desktop, the function performs strangely. If I save the email and then immediately move the email to another folder. The customProps.saveAsync(); will fail(nothing saved to exchange server). However, if I re-launch the add-in on the email before moving out to another folder, the custom info will be saved successfully.
Seems to me on Outlook desktop the custom properties will not be written to the exchange server immediately, instead, it will wait until it is being triggered(re-launch add-in etc I do not know the exact mechanism). However, if the email being moved to another folder right after being saved in an add-in, the pending function will be lost.
I found this describing seemingly similar behavior. So I then turned off the "cache" mode in outlook but the problem persisted.
I also tried using EWS's API to perform the "save custom properties", but the problem still persisted.
Am I missing somethinghere or it is Outlook desktop's bug?
You are not missing something - this is definitely a bug in Outlook Desktop. Thank you for reporting the issue. We are investigating and will work on a fix as quickly as we can.
As a workaround in the interim, you can switch messages within the same folder in order to trigger a save. The workaround you found of re-opening an Add-in may also work.

In Outlook Interop, how do I tell if an AppointmentItem has been saved (and not simply closed without saving)?

I have some code that needs to run whenever a user saves or sends an Outlook appointment.
Currently I register a close event to the Inspector and run my code within that event:
((Outlook.InspectorEvents_Event)_inspector).Close += InspectorWrapper_Close;
For the most part this is okay unless the user closes the inspector window without saving their changes. In that case, it is critical that my code does not run.
I have been searching for either a save event to which I can register my appointment or any kind of flag to indicate if the item was actually saved.
The AppointmentItem object has a .Saved property, but it always returns false.
Any help is appreciated.
Use AppointmentItem.Write / AfterWrite events. Keep in mind that Outlook can autosave an appointment.

Programmatically accessing archived mails in an Exchange folder

I am trying to access all the mails in a given folder via the ActiveX interface to Outlook 2013. I use the message API (MAPI) of Outlook to get the desired folder object.
However, when I go through all the items of this folder object, many messages are missing. Indeed, there are messages that are on the MS Exchange server that are not synchronized with Outlook because they are too old. (In Outlook, the folder ends with a link named 'Click here to view more on Microsoft Exchange'. When clicking on the link, the missing messages appear in Outlook. However they are not added to the folder object after this operation.)
How to access those messages? Is it possible via the Outlook ActiveX interface? If not, is there an equivalent interface to the MS Exchange server?
To access older (but not archived) emails, you can either
Set the Exchange account to sync all items in the Exchange account properties dialog. Outlook must be restarted.
Set the Exchange account to sync all items programmatically. You can do that using Extended MAPI (C++ or Delphi only), there is a flag that needs to be set in the MSEMS store profile section (the property tag is 0x66490003). Redemption (I am its author - any language) exposes the RDOExchangeMailboxStore.MonthsToKeepOffline / DaysToKeepOffline properties. Outlook must be restarted.
Open the parent folder in the online mode using the MAPI_NO_CACHE flag when calling IMsgStore::OpenEntry (Extended MAPI, C++ or Delphi only). Redemption (I am its author) lets you pass that flag when you open the folder using RDOSession.GetFolderFromID from any language.

Outlook 2013 VSTO Addin - How to check if the Mail view is selected?

In an Outlook 2013 VSTO addin (C#), I can check to see if the user is currently in the Calendar area/view by using "if(ActiveExplorer().CurrentView is CalendarView) ..."
How do I do something similar to check and see if the user is in the Mail view, where "Mail" is selected/blue at the bottom of the Outlook window and the user sees their Inbox items? There is no MailView type, or anything similar that I could find, to compare ActiveExplorer().CurrentView, etc., against.
Instead of using the CurrentView property of the Explorer class I'd suggest checking the DefaultItemType property of the Folder class. It returns a constant from the OlItemType enumeration indicating the default Outlook item type contained in the folder.
The CurrentFolder property of the Folder class returns a Folder object that represents the current folder displayed in the explorer. So, the code may look like the following one:
ActiveExplorer().CurrentFolder.DefaultItemType

Extending Favorite using DataExtender and how do I debug it?

I have previously asked a question regarding renaming favorites, here: Tridion Favorites - ability to rename favorite links
Now based on some research from this question Can the list of favorites be extended using a Data Extender?
I am extending the favorites by using dataextender. So the idea is whenever favorite list is retrieved, I would replace it with renamed values of the favorites (the renamed values which are stored as a seperate appdata). But for some reason my dataextender doesnt seem to be working/included in the tridion.
My first question is:
Can I listen to favorites reader by looking for command GetList?
Second Question:
Also in the config, do I just mention it in the ext:DataExtender element or do i need mention other elements like ext:list
Final Question:
Is there a way I can debug my dataextender from visual studio like we can debug event system by attaching to dllhst3g.exe...
To extend List Favorites, you should listen to GetListUserFavorites command.
No, just ext:dataextender
And yes, as Nuno mentioned, to debug DataExtenders you should attach to w3wp.exe process.

Resources