Quantcast
Channel: Outlook for Developers forum
Viewing all 6421 articles
Browse latest View live

open outlook items via script

$
0
0

I'd like to know if there is a way of getting a script to run every x minutes and send new emails to a test Outlook 2013 mailbox. And at the other end a way of automatically being able to open the delivered mail. If so could someone post this example within this thread ?

Basically I am trying to simulate a user opening and closing an email.

Thanks


Calendar Addin - Banner Logo dimensions - what size?

$
0
0
I am creating an Add in for Calendar and I am looking to added a banner logo to the first iframe windows, what dimension size can I use to best display this?

Assigning different rooms to recurring meeting occurences programatically

$
0
0

Hi,

I've seen a bit of different/inconsistent behaviour here and am trying to do the following:

  • Create a new recurring meeting in outlook (with no room resource assigned
  • Assign the recurring resources to different rooms depending on availability
  • Send the meeting request and recieve the expected notification emails of room bookings

Firstly, if i dont assign the room resource at the meeting level, i dont get any room booking confirmations for the occurence room changes.

If i do set the meeting room, say to Room1, then set a number of the recurring occurences to use room2 (which i know are availabile), i get emailes that room2 was booked for the dates, but i also get the standard "resource conflicts" email saying those dates ive assigned room2 to, have room1 booked out to someone else, so it seems that it doesnt seem to take into account that i've set the rooms to room2 in the occurences.

private void saveSchedule_Click(object sender, EventArgs e)
{
    Inspector inspector = null;
    object item = null;

        inspector = Globals.ThisAddIn.Application.ActiveInspector();
        if (inspector != null)
        {
            item = inspector.CurrentItem;
            if (item is AppointmentItem)
            {
                // use appointment
                AppointmentItem appointment = item as AppointmentItem;
                if (appointment.IsRecurring)
                {
                    //get the recurring item from appointment
                    var recurrencePattern = appointment.GetRecurrencePattern();

                    //find the primary room to use
                    var groupedRooms = _schedule.Items.GroupBy(g => g.Address).Select(s => new { Address = s, Count = s.Count() });
                    var primaryRoom = groupedRooms.OrderByDescending(x => x.Count).Select(s => s.Address).First().Key;
                    var singleRoomForAllDates = groupedRooms.Count() == 1;

                    if (singleRoomForAllDates)
                    {
                        var primaryRoomResource = appointment.Recipients.Add(primaryRoom.Address);
                        primaryRoomResource.Type = (int)OlMeetingRecipientType.olResource;
                        appointment.Location = primaryRoom.Name;
                    }
                    else
                    {
                        //loop through the allocated rooms in the schedule and update the appointment accordingly
                        foreach (var scheduleEntry in _schedule.Items)
                        {
                            //get the recurring item occurence for the entry start date
                            var occurence = recurrencePattern.GetOccurrence(scheduleEntry.Range.Start);

                            //this is an exception as its using a different room
                            var alternativeRoomResource = occurence.Recipients.Add(scheduleEntry.Address.Address);
                            occurence.Location = scheduleEntry.Address.Name;
                            alternativeRoomResource.Type = (int)OlMeetingRecipientType.olResource;
                        }
                    }
                }
            }
        }
}

Any help appreciated.


Error 5 in Outlook installer

$
0
0

Here is the error message: Error 5 To enable 'Download prerequisites form the location as my application' in the prerequisites dialog box, you must download file 'DotNetFX4client\dotNetFx40_CLient_x86_x64.exe' for item 'Microsoft .NET Framework 4 Client profile (x86 and x64)' to your local machine . For more information , seehttp://go.microsoft.com/fwlink/?LinkId=239883. c:\Users\me\Documents\classify for Outlook 5.5.5 Source\Setup\Setup.vdproj setup

How do I fix this error?

Outlook.com pins and scheduled emails

$
0
0

Outlook.com and outlook mobile now allow for very cool features like:

pins: pin an email to the top of the folder
scheduled emails: once you receive an email you can remove it from your inbox and get it back a certain time in the future defined by the user.

I have been reviewing the latest API version, but I don't see any call that allows me to retrieve those emails. Maybe I overlooked?
If they are indeed not available, would it be in the future?

Kind Regards,

Cris

Custom Category Colors not Available to all Calendar Users

$
0
0

We use calendars to track tasks for several of our vehicles and we use categories (colors) to distinguish task status (booked, ready for pickup, completed, and so on).  The calendars are shared with three others and they are listed as Editors, however, one of them does not see the "non-standard" categories and colors.  I assume it is her profile setting but can not find anything that corrects this. 

Can anyone please help me in correcting this issue, you assistance would be greatly appreciated!

Thanks in advance,

Brian

MeetingResponseStatus always equals "olResponseNone"

$
0
0
I am iterating through the Recipients collection and inspecting the MeetingResponseStatus property of each Recipient object.

Each one has the value "olResponseNone".  Any ideas.

FYI:  I call Resolve() before checking the MeetingResponseStatus property.

Any ideas?

How can I share UserProperties between users?

$
0
0

My Add-In stores specific values in the UserProperties collection of the MeetingItem as well as in the associated AppointmentItem.

These values are displayed in a custom form in the Inspector Window.

SCENARIO:

I send a meeting invitation out to Invitee1 and Invitee2

They both accept, and Invitee1 updates the custom form in the Inspector Window.
He will always be able to see this information.

When Invitee2 opens the appointment in his calendar, I would like him to see this information as well.

As far as I can tell, when Invitee1 updates the Appointment in his calendar, the only thing updated is his copy of the appointment for this meeting and no one else's. 

I guess I'm looking for some shared area that I can add information to.


x64 outlook2016 and CoCreateInstance error 0x80040155 on win10

$
0
0

There is a document How to: Check the Version of Outlook https://msdn.microsoft.com/en-us/library/office/dd941331(v=office.15).aspx#

it gives componentId for outlook2010,outlook2013, what is the id for outlook2016? Where I can find the ID for outlook2016?

Also I found office 2016 automation can not work well on x64 win10. The following code will create outlook process instance, the code work fine with both 32bit and 64bit outlook2010,outlook2013 on win7/win8.

CComPtr<outlook::_application>spApp;

hr = spApp.CoCreateInstance(__uuidof(Outlook::Application), NULL, CLSCTX_LOCAL_SERVER);

The code works fine with both x32/x64 outlook2016 on win7,the code works fine too with 32 bit outlook2016 on x64 win10 too, but the code will get error hr=0x80040155 with 64 bit outlook2016 on win10, uninstall/reinstall x64 office2016 won’t fix the problem. Could it be a Win10 compatible issue with x64 outlook automation?

Thanks in advance.

Require MS Outlook 2007 security hash generator tool

$
0
0
Please where can i find the The Office Outlook 2007 Security Hash Generator Tool download. The microsoft link is no longer available. 

Addin Event BeforeItemMove gets deleted by EWS or OWA Move Operation

$
0
0

Hi,

I want to disallow users to move or delete emails from their inbox. Currently I use a .NET addin which sets the "BeforeItemMove" event for the affected folders and always sets "Cancel = true;" and it is working fine.

All users are able to move emails with a custom button. Since the moving should be done by another user account with more rights,I use the "Microsoft.Exchange.Webservices" EWS API to create a second connection to Exchange with a different user and to move the email. This is also working fine. (I convert the EntryID to EwsID)

After the inbox email has been moved to a subfolder via Ews (with a Outlook addin Button)the "BeforeItemMove" events are gone, and the user can move emails again freely. I can set the event handlers again, but than they won't always fire or stop working after some tries.

The same happens when user A works in Outlook with mailbox Z and user B accesses the same mailbox Zwith Outlook Web Access (OWA), after moving a mail the already set and working eventhandlers are gone or do not fire anymore.

User A has full rights to mailbox Z, User B is owner of mailbox Z.

If user B (owner) uses Outlook and OWA at the same time, everything works and the events won't get lost.

But I need two different users, because one user should not be able to move mails by himself, another user account should be used for that.

We use Exchange 2016, Outlook 2013, .NET 4 and the latest Ews assemblies from NuGet.

Why does Outlook loose a event when a mail gets moved by EWS or OWA? I don't get it.

Thanks and regards


Where/when automaticly created using EWS in Appointment body

$
0
0

As discussed in this thread there is still no solution by removing/hide the where/when text in a appointment body created with EWS (exchange 2013)? Our users don't want to see this text.

How can I reliably find the Associated AppointmentItem

$
0
0

We have a database that is updated when Appointments/Meetings are added, deleted, and updated.  We store custom values in the UserProperty property of these Appointment/MeetingItmes

Further, the database updates are called from the (CalendarFolder).ItemChange and (SentItemsFolder).ItemAdd event handlers  because the events that trigger these event handlers are fired by Outlook after network connectivity has been restored; which saves us the headache of programming some sort of polling.

THE PROBLEM:
Create Meeting and Send it to another person.
Now Cancel that meeting and send the Cancelation.

In your "Sent Items" folder you will find the Meeting Cancelation you've just sent.

In the "Deleted Items" folder you will find the AppointmentItem that has just been deleted from your calendar.



Is there some combination of properties that I can use to search the DeletedItems folder that will match the AppointmentItem correspeonding to the Canceled MeetingItem in the "Sent Items" folder.


Outlook PST repair Tool

$
0
0
A pst looks like it needs repairing however the pst file is 5 GB large. Everytime I click ok to fix the pst file after it does the CRC check, it crashed. Is there anyway to reduce the size of the PST file so the repair tool  wont crash?

Extend Outlook User Interface

$
0
0

I would like to extend a generic user interface of Outlookactivity item.
The existing Activity items are journal entry,task and a note.

The purpose of extending is to override the main tab (with red border), but to enable the functionality of other tabs (circled in yellow)

If I extend the Outlook task item, I cannot override the main tab.
If I decide to create a custom form-region, I cannot enable the other tabs.

Any ideas?


Recipient.Resolve() - Always Returns true

$
0
0
As an Experiment, I sent an email to the following users

User A - (Exchange user)
User B - (Yahoo email)
User C - (Exchange user)
User D - (Gmail user)

When I iterated through the Recipients collection and called the "Resolve" method for each Recipient object in the collection, I found that each call returned "True".  I can see that being the case for the Exchange Users, however I don't see how the Yahoo, and Gmail users could be resolved successfully if they don't appear in the Address Book.

Any guesses here?


Log entries when address book is loaded.

$
0
0

I am getting these log entries when the address book loads :

0x3f34 12:14:22.243AM  04-04-2016 AutoLoadMAPI - loading MAPI exports
0x3f34 12:14:22.244AM  04-04-2016 LoadMAPIFuncs - loading from 0x55FC0000
0x3f34 12:14:22.244AM  04-04-2016 Failed to load "MNLS_lstrlenW" from 0x55FC0000

Is there any way to fix that?


Regards, (Mr) Kim Groves

Get copied outlook attachment from clipboard in Outlook 2016

$
0
0

Hi.

I am trying to get a copied attachment (through ctrlL+c) from clipboard in outlook 2016. Following code is what I use and is functional for all outlook versions except for 2016. This method is being called when the user simulates a copy through CTRL+C.

void GetClipBoardFiles()

{              

            // Getting the outlook process id using windows API

            int outlookProccessId = GetProcessCurrent();

            // getting the clipboard process id using windows API
            IntPtr hwndClipboardOwner = GetClipboardOwner();

            //  getting owners process id of clipboard using windows API
            uint processClipboardOwner = GetProcessFromWindowHandle(hwndClipboardOwner);

            // If clipboard owner and outlook process id is equal, this copy is done within outlook.
            if (outlookProccessId == processClipboardOwner)
            {
                string[] fileNames = null;
               // Check for the available files details in clipboard
                if (Clipboard.ContainsFileDropList())
                {

                   // my custom code.

                }

             }

}

Above code works fine in outlook 2003,2007,2010 and 2013 but for Outlook 2016, sometimes this code does not work. Even though the ctrl+C is simulated in outlook, owner's process id of clipboard do not match with outlook process id. Even it matches, Clipboard.ContainsFileDropList() method returns false while i can really paste the content which i copied to some folder or desktop.

Is it something to do with a new behavior of Outlook 2016 ? are there any accurate ways to get the clipboard contents copied in Outlook.


Outlook create calendar event rest api is not adding attendee in event

$
0
0

Hi,

I am trying to add an calendar event with attendee using below outlook calendar rest API. After posting request I am able to add the event to outlook account but attendee is added as organiser name and email. This API is not adding actual requested attendee to event.

Rest API : https://outlook.office.com/api/v2.0/me/events


here I am sending attendee as abc.xyz.1231@outlook.com but in response it is showing attendee as organiser.

Also I tried to send same request with multiple attendee but getting the same response.

Below is the request and response body :

Request Body :  

{
  "Subject": "Calendar Test",
  "Body": {
    "ContentType": "HTML",
    "Content": "I think it will meet our requirements!"
  },
  "Start": {
      "DateTime": "2016-02-08T18:00:00",
      "TimeZone": "Pacific Standard Time"
  },
  "End": {
      "DateTime": "2016-02-08T19:00:00",
      "TimeZone": "Pacific Standard Time"
  },
  "Attendees": [
    {
      "EmailAddress": {
        "Address": "abc.xyz.1231@outlook.com",
        "Name": "Mayank"
      },
      "Type": "Required"
    }
  ]
}

Response Body :

HTTP/1.1 201 Created
Transfer-Encoding: chunked
request-id: d2729ca3-3da3-47cf-b829-d9eaeb08d3f5
X-CalculatedBETarget: DM2PR0601MB0953.namprd06.prod.outlook.com
X-BackEndHttpStatus: 201
OData-Version: 4.0
X-DiagInfo: DM2PR0601MB0953
X-BEServer: DM2PR0601MB0953
X-FEServer: BY2PR03CA075
Cache-Control: private
Date: Wed, 04 May 2016 11:14:00 GMT
ETag: W/"9/iLS37JHU2Wy9xJENfCdgAACbmZcA=="
Location: https://outlook.office.com/api/v2.0/Users('0003bffd-e693-781e-0000-000000000000@84df9e7f-e9f6-40af-b435-aaaaaaaaaaaa')/Events('AQMkADAwATNiZmYAZC1lNjkzLTc4MWUtMDACLTAwCgBGAAADvsjsE_OVy0ObpQYsuteAWQcA9-iLS37JHU2Wy9xJENfCdgAAAgENAAAA9-iLS37JHU2Wy9xJENfCdgAAAAm5IC0AAAA=')
Set-Cookie: exchangecookie=0e2ff3e4c79242d98b7ad74ac3d6e21a; expires=Thu, 04-May-2017 11:14:00 GMT; path=/; HttpOnly
Server: Microsoft-IIS/8.0
X-AspNet-Version: 4.0.30319
X-Powered-By: ASP.NET

{
    "Id": "AQMkADAwATNiZmYAZC1lNjkzLTc4MWUtMDACLTAwCgBGAAADvsjsE_OVy0ObpQYsuteAWQcA9-iLS37JHU2Wy9xJENfCdgAAAgENAAAA9-iLS37JHU2Wy9xJENfCdgAAAAm5IC0AAAA=",
    "CreatedDateTime": "2016-05-04T04:14:00.8973264-07:00",
    "LastModifiedDateTime": "2016-05-04T04:14:01.5379556-07:00",
    "ChangeKey": "9/iLS37JHU2Wy9xJENfCdgAACbmZcA==",
    "Categories": [],
    "OriginalStartTimeZone": "Pacific Standard Time",
    "OriginalEndTimeZone": "Pacific Standard Time",
    "ResponseStatus": {
        "Response": "Organizer",
        "Time": "0001-01-01T00:00:00Z"
    },
    "iCalUId": "040000008200E00074C5B7101A82E00800000000D077600FF6A5D101000000000000000010000000FBD4194F454620408785060AD8D572FB",
    "ReminderMinutesBeforeStart": 15,
    "IsReminderOn": true,
    "HasAttachments": false,
    "Subject": "Calendar Test",
    "Body": {
        "ContentType": "HTML",
        "Content": "<html>\r\n<head>\r\n<meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\">\r\n<meta content=\"text/html; charset=us-ascii\">\r\n</head>\r\n<body>\r\nI think it will meet our requirements!\r\n</body>\r\n</html>\r\n"
    },
    "BodyPreview": "I think it will meet our requirements!",
    "Importance": "Normal",
    "Sensitivity": "Normal",
    "Start": {
        "DateTime": "2016-02-08T18:00:00.0000000",
        "TimeZone": "Pacific Standard Time"
    },
    "End": {
        "DateTime": "2016-02-08T19:00:00.0000000",
        "TimeZone": "Pacific Standard Time"
    },
    "Location": {
        "DisplayName": "",
        "Address": {},
        "Coordinates": {}
    },
    "IsAllDay": false,
    "IsCancelled": false,
    "IsOrganizer": true,
    "Recurrence": null,
    "ResponseRequested": true,
    "SeriesMasterId": null,
    "ShowAs": "Busy",
    "Type": "SingleInstance",
   "Attendees": [
        {
            "Status": {
                "Response": "None",
                "Time": "0001-01-01T00:00:00Z"
            },
            "Type": "Required",
            "EmailAddress": {
                "Name": "prajol shakya",
                "Address": "testdevcrm@outlook.com"
            }
        }
    ],
    "Organizer": {
       "EmailAddress": {
            "Name": "prajol shakya",
            "Address": "testdevcrm@outlook.com"
        }
    },
    "WebLink": "https://outlook.live.com/owa/?ItemID=AQMkADAwATNiZmYAZC1lNjkzLTc4MWUtMDACLTAwCgBGAAADvsjsE%2BOVy0ObpQYsuteAWQcA9%2FiLS37JHU2Wy9xJENfCdgAAAgENAAAA9%2FiLS37JHU2Wy9xJENfCdgAAAAm5IC0AAAA%3D&exvsurl=1&viewmodel=ICalendarItemDetailsViewModelFactory"
}

Kindly let me know what is going wrong here. Please help out to fix this issue

Regards,

Mayank

 

How to implement an 3rd party IM provider for outlook 2010 (Error- hr = 0x80040200)

$
0
0

Reference link : Integrating IM applications with Office (https://msdn.microsoft.com/en-us/library/office/jj900715.aspx?f=255&MSPPError=-2147217396). This is for office 2013 but it is also applicable for office 2010 as well (mentioned in article).

I am trying to write 3rd party IM Client application with outlook 2010. I'm using VS2010 & Lync SDK 2010 (Microsoft.Office.Uc (version 4.0.7577.5)) with .NET Framework(3.5). But outlook is giving below errors. I also checked many other posts like "http://msdev.developer-works.com/article/29718323/How+to+implement+an+IM+provide+for+outlook"

I have implemented almost all interfaces but reason of the problem is unknown to me. Please suggest problem/solution

Errors:

CMsoIMProviderFactory::HrEnsureDefaultIMAppRegKeys Succeeded opening reg key (HKCU:SOFTWARE\IM Providers\)
CMsoIMProviderFactory::HrEnsureDefaultIMAppRegKeys Succeeded querying reg key (HKCU:SOFTWARE\IM Providers\:DefaultIMApp:CSExeCOMServer)
CMsoIMProviderFactory::HrEnsureDefaultIMProcessRegKey Succeeded opening reg key (HKCU:SOFTWARE\IM Providers\CSExeCOMServer)
CMsoIMProviderFactory::HrEnsureDefaultIMProcessRegKey Succeeded opening reg key (HKLM:SOFTWARE\IM Providers\CSExeCOMServer)
CMsoIMProviderFactory::WhichMessengerInProcessList Using (CSExeCOMServer) process name for search
<CMsoIMNAbstractionLayer::HrPostJob> <job:IMsoPresenceJobProviderConnect>
<CMsoIMNALAsyncNotificationHandler::HrInitialize>
</CMsoIMNALAsyncNotificationHandler::HrInitialize>
<CMsoIMNALAsyncNotificationHandler::DwThreadProc>
<CMsoIMNAbstractionLayer::HrOnJob> <job:IMsoPresenceJobInitialize>
<CMsoIMNAbstractionLayer::HrInitializeInternal>
<CMsoIMNAbstractionLayer::HrPostJob> <job:IMsoPresenceJobProviderConnect>
</CMsoIMNAbstractionLayer::HrPostJob>  <job:IMsoPresenceJobProviderConnect>
</CMsoIMNAbstractionLayer::HrInitializeInternal>
</CMsoIMNAbstractionLayer::HrPostJob>  <job:IMsoPresenceJobProviderConnect>
</CMsoIMNAbstractionLayer::HrOnJob>  <job:IMsoPresenceJobInitialize>
<CMsoIMNAbstractionLayer::HrPostJob> <job:IMsoPresenceJobProviderConnect>
<CMsoIMNAbstractionLayer::HrOnJob> <job:IMsoPresenceJobProviderConnect>
</CMsoIMNAbstractionLayer::HrPostJob>  <job:IMsoPresenceJobProviderConnect>
<CMsoIMNAbstractionLayer::HrEnsureIMApp>
<CMsoIMNAbstractionLayer::HrPostJob> <job:IMsoPresenceJobProviderConnect>
<CMsoIMProviderFactory::HrGetAvailableProvider>
</CMsoIMNAbstractionLayer::HrPostJob>  <job:IMsoPresenceJobProviderConnect>
CMsoIMProviderFactory::WhichMessengerInProcessList Using (CSExeCOMServer) process name for search
<CMsoProviderOCom::HrInitialize>
<CMsoProviderOCom::HrEnsureIMCallback>
CMsoProviderOCom::HrEnsureIMCallback !failed!  Line: 741  hr = 0x80040200
</CMsoProviderOCom::HrEnsureIMCallback !failed! hr = 0x80040200>
CMsoProviderOCom::HrInitialize !failed!  Line: 653  hr = 0x80040200
</CMsoProviderOCom::HrInitialize !failed! hr = 0x80040200>
CMsoIMProviderFactory::HrGetAvailableProvider !failed!  Line: 432  hr = 0x80040200
!!!Provider Initialization Failed!!!
<CMsoProviderOCom::HrGetLocalCapabilities>
CMsoIMProviderFactory::HrGetAvailableProvider !failed!  Line: 289  hr = 0x80004005
!!!Provider Initialization Failed!!!
</CMsoIMProviderFactory::HrGetAvailableProvider !failed! hr = 0x80004005>
CMsoIMNAbstractionLayer::HrEnsureIMApp !failed!  Line: 2239  hr = 0x80004005


Viewing all 6421 articles
Browse latest View live