Authorization for Microsoft account fails for OAuth V2.0 while it works for 1.0 in android.
Microsoft's SDK appends V2 in the URL by itself.
https://login.microsoftonline.com/common/OAuth/...
https://login.microsoftonline.com/common/OAuth/V2/...Thus the login process fails. Whats the procedure to obtain OAuth in android
Authorization fails for OAuth2.0 in android
Restrict custom properties in email item in vbscript
Datetime filter on emails received within the previous 5 days
Hi,
I have a addin for Outlook 2013 that will auto accept a meeting invite if sent from a certain email address. If the user is away and does not open Outlook for a period of 5 day I want to create the functionality where on startup the addin will take all mail from the previous 5 days and determine if there are any MeetingItems and process accordingly. I am having difficulty with this filter.
void ThisApplication_MAPILogonComplete() { ItemInRange(); } private void ItemInRange() { DateTime end = DateTime.Now; DateTime start = end.AddDays(-5); GetAppointmentsInRange(inbox, start, end); } private void GetAppointmentsInRange(Outlook.MAPIFolder folder, DateTime start, DateTime end) { string endTime = end.ToString("MM/dd/yyyy HH:mm"); string startTime = start.ToString("MM/dd/yyyy HH:mm"); string restrictCriteria = "[Start] >= '" + startTime + "' AND [End] <= '" + endTime + "'"; Outlook.Items folderItems = null; Outlook.Items resultItems = null; Outlook._AppointmentItem appItem = null; int counter = default(int); object item = null; try { folderItems = folder.Items; folderItems.IncludeRecurrences = true; //folderItems.Sort("[Start]"); resultItems = folderItems.Restrict(restrictCriteria); item = resultItems.GetFirst(); ...folderItems is getting the 5000+ emails in my inbox, but when I apply the filter resultItems.Count = 0. The filter as of the time of writing is: restrictCriteria"[Start] >= '04/08/2016 08:29' AND [End] <= '04/13/2016 08:29'"
Outlook 2016 addin not working
Hi
I create a new addin for outlook 2016 with IDTExtensibility2. Only give a message box on "OnConnection" method in connect.cs file. I installed the project. When I open the Outlook messagebox is not displaying. I checked the loadbehavior in registry. First it value is "2". So I manually changed the loadbehavior to "1". And I also checked Files->Options->Addins. My Addin is under Active Application Addins. Then Why it not displaying the message box ?
The developing and testing machine is same. I installed office 2016 trial version. In project I added reference of Microsoft.Office.Interop.Outlook and Microsoft.Office.Interop.Office. Both version is 14.0.0.0. I need to install PIA for outlook 2016?
Thanks
Bobbin Paulose
outmail .Send error
Sub BirthDay() Dim OutApp As Object Dim OutMail As Object Dim olConItems As Outlook.Items Dim olItem As Outlook.ContactItem Dim olApp As Outlook.Application Dim olFolder As Outlook.Folder Set olApp = Application Set olFolder = olApp.GetNamespace("MAPI").GetDefaultFolder(10) Set olConItems = olFolder.Items Set OutApp = CreateObject("Outlook.Application") Set OutMail = OutApp.CreateItem(0) Dim a As String For Each olItem In olConItems If TypeName(olItem) = "ContactItem" Then If olItem.FirstName <> "" Then a = a + olItem.Email1Address + ";" With OutMail .Subject = "This is the Subject line" .Body = "Hi there" 'You can add other files also like this '.Attachments.Add ("C:\test.txt") .To = olItem.Email1Address .Send End With End If End If Next olItem End Sub
hello everybody, this is my code I'm trying to send email to every contact on my list contacts, but the .send methode isn't working for me OI get an error, i get a message that .To element is deleted or placed
thank you
Migrated vbscript from Outlook 2003 to Outlook 2013
I found some script not working after migrated to Outlook 2013.
Example 1) DateDiff("d", INPUT_DATE, Now())
Example 2) Message.UserProperties.add("customField", olText)
Please suggest how to use the function in Outlook 2013 via vbs, thanks.
Step by step how do you deploy an Outlook application from Visual Studio 2013?
This is something I have not done before so I am looking for step by step instructions in how to deploy an Outlook application to another server from my Visual Studio 2013 project?
How to add new property to email item in VBScript
How to add new property to email item in VBScript?
The property name is "My_Property"
Thanks.
Create an email template with macros
Getting exception "System.Runtime.InteropServices.COMException (0x80004023): Retrieving the COM class factory for component with CLSID {0006F03A-0000-0000-C000-000000000046} fail due to error: 80004023.", in downloading attachment from Outlook by Addins
Environment: -
OS: - Windows 7 64 bit
MS Office - 2013 64 bit
Add Ins Development: - Shared Add Ins
IDE: - Visual Studio 2008
Language: - VB.Net
.
Add Ins description: - We have developed add ins, which creates button on standard tool bar of the Outlook. And after selecting a mail, we click on button which stores mail body as html and it attachment separately in a folder.
.
We are using below code snippet for downloading attachment from a particular mail. I have tested Add Ins on 4 machine, while it has thrown exception in one of the machine. It seems to me machine or Outlook specific issue.
.
Public Sub GetAttachmentsOfCurrentEmail() Dim activeExplorer As New Microsoft.Office.Interop.Outlook.Application Dim Report As String Dim currentExplorer As Explorer currentExplorer = activeExplorer.ActiveExplorer Try Selection = currentExplorer.Selection For Each currentItem In Selection currentMail = currentItem For Each attachment In currentMail.Attachments Report = Report & GetAttachmentInfo(attachment) Next Catch ex As System.Exception End Try End Sub Public Function GetAttachmentInfo(ByVal attachment As Attachment) As String Dim Report As String = "" 'Report = Report & "Block Level: " & attachment.BlockLevel Report = Report & "Display Name: " & attachment.DisplayName Report = Report & "File Name: " & attachment.FileName Dim fileName As String = "C:/Addin/Omnidocs_Outlook_Attachment/" & attachment.FileName attachment.SaveAsFile(fileName) Report = Report & "Index: " & attachment.Index Report = Report & "Path Name: " & attachment.PathName Report = Report & " & attachment.Position 'Report = Report & "Size: " & attachment.Size Report = Report & "Type: " & attachment.Type & vbCrLf documentselected.Items.Add(attachment.DisplayName) 'MsgBox(Report) Return Report End Function
When clicked on button, following exception occurred
See the end of this message for details on invoking just-in-time (JIT) debugging instead of this dialog box. ************** Exception Text ************** System.Runtime.InteropServices.COMException (0x80004023): Retrieving the COM class factory for component with CLSID {0006F03A-0000-0000-C000-000000000046} failed due to the following error: 80004023. at Addins.dms.GetAttachmentsOfCurrentEmail() at Addins.dms.dms_Load(Object sender, EventArgs e) at System.Windows.Forms.Form.OnLoad(EventArgs e) at System.Windows.Forms.Control.CreateControl(Boolean fIgnoreVisible) at System.Windows.Forms.Control.CreateControl() at System.Windows.Forms.Control.WmShowWindow(Message& m) at System.Windows.Forms.Control.WndProc(Message& m) at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m) at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam) ************** Loaded Assemblies ************** mscorlib Assembly Version: 2.0.0.0 Win32 Version: 2.0.50727.5485 (Win7SP1GDR.050727-5400) CodeBase: file:///C:/Windows/Microsoft.NET/Framework64/v2.0.50727/mscorlib.dll ---------------------------------------- Addins Assembly Version: 1.0.5941.21323 Win32 Version: CodeBase: file:///C:/Program%20Files/Addins/Newgen%20Software%20Technologies%20Ltd/Addins/Addins.DLL ---------------------------------------- Extensibility Assembly Version: 7.0.3300.0 Win32 Version: 7.00.9466 CodeBase: file:///C:/Windows/assembly/GAC/Extensibility/7.0.3300.0__b03f5f7f11d50a3a/Extensibility.dll ---------------------------------------- Microsoft.Office.Interop.Outlook Assembly Version: 15.0.0.0 Win32 Version: 15.0.4569.1506 CodeBase: file:///C:/Windows/assembly/GAC_MSIL/Microsoft.Office.Interop.Outlook/15.0.0.0__71e9bce111e9429c/Microsoft.Office.Interop.Outlook.dll ---------------------------------------- office Assembly Version: 15.0.0.0 Win32 Version: 15.0.4569.1506 CodeBase: file:///C:/Windows/assembly/GAC_MSIL/office/15.0.0.0__71e9bce111e9429c/office.dll ---------------------------------------- Microsoft.VisualBasic Assembly Version: 8.0.0.0 Win32 Version: 8.0.50727.5483 (Win7SP1GDR.050727-5400) CodeBase: file:///C:/Windows/assembly/GAC_MSIL/Microsoft.VisualBasic/8.0.0.0__b03f5f7f11d50a3a/Microsoft.VisualBasic.dll ---------------------------------------- System Assembly Version: 2.0.0.0 Win32 Version: 2.0.50727.5485 (Win7SP1GDR.050727-5400) CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System/2.0.0.0__b77a5c561934e089/System.dll ---------------------------------------- System.Windows.Forms Assembly Version: 2.0.0.0 Win32 Version: 2.0.50727.5491 (Win7SP1GDR.050727-5400) CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System.Windows.Forms/2.0.0.0__b77a5c561934e089/System.Windows.Forms.dll ---------------------------------------- System.Drawing Assembly Version: 2.0.0.0 Win32 Version: 2.0.50727.5495 (Win7SP1GDR.050727-5400) CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System.Drawing/2.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll ---------------------------------------- System.Web Assembly Version: 2.0.0.0 Win32 Version: 2.0.50727.5491 (Win7SP1GDR.050727-5400) CodeBase: file:///C:/Windows/assembly/GAC_64/System.Web/2.0.0.0__b03f5f7f11d50a3a/System.Web.dll ---------------------------------------- Microsoft.VisualBasic.Compatibility Assembly Version: 8.0.0.0 Win32 Version: 8.0.50727.5483 CodeBase: file:///C:/Windows/assembly/GAC_MSIL/Microsoft.VisualBasic.Compatibility/8.0.0.0__b03f5f7f11d50a3a/Microsoft.VisualBasic.Compatibility.dll ---------------------------------------- System.Configuration Assembly Version: 2.0.0.0 Win32 Version: 2.0.50727.5483 (Win7SP1GDR.050727-5400) CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System.Configuration/2.0.0.0__b03f5f7f11d50a3a/System.Configuration.dll ---------------------------------------- System.Xml Assembly Version: 2.0.0.0 Win32 Version: 2.0.50727.5494 (Win7SP1GDR.050727-5400) CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System.Xml/2.0.0.0__b77a5c561934e089/System.Xml.dll ---------------------------------------- System.Data Assembly Version: 2.0.0.0 Win32 Version: 2.0.50727.5483 (Win7SP1GDR.050727-5400) CodeBase: file:///C:/Windows/assembly/GAC_64/System.Data/2.0.0.0__b77a5c561934e089/System.Data.dll ---------------------------------------- ************** JIT Debugging ************** To enable just-in-time (JIT) debugging, the .config file for this application or computer (machine.config) must have the jitDebugging value set in the system.windows.forms section. The application must also be compiled with debugging enabled. For example: <configuration><system.windows.forms jitDebugging="true" /></configuration> When JIT debugging is enabled, any unhandled exception will be sent to the JIT debugger registered on the computer rather than be handled by this dialog box.
Kindly assist, I will be really thankful.
Regards, S.P Singh
Log entries when address book is loaded.
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
Are there any plans to support the new Outlook module extension point in outlook.com?
Just looking at the new module extension point for Outlook add-ins.
https://dev.office.com/docs/add-ins/outlook/extension-module-outlook-add-ins?product=outlook
I notice that this is only currently available for the desktop version of Outlook
Note: Module extensions are available only in Office 2016 Click to Run.
Does anyone know if this extension is going to eventually be made available for the web app Outlook.com and if so when?
regards
Outlook 2013 Logging
Hi,
I am trying to integrate IM application using Microsoft.Office.UC.dll with Outlook 2013.But i don't have logs of outlook 2013.Can any one help how to enable logging from outlook 2013?
Outlook VSTO Addin > Customize the Meeting form using Outlook Form Regions > Unable to persist values for custom fields
Hello,
I have customized the Outlook Meeting form in Visual Studio using Outlook Form Regions and have added few custom fields/controls on it.
The problem is, when I re-open the saved meeting item, the values of the custom fields are not persisted.
Need further guidance.
Thanks!
-Vinay Pugalia
If a post answers your question, please click "Mark As Answer" on that post or"Vote as Helpful".
Web : Inkey Solutions
Blog : My Blog
Email : Vinay Pugalia
Use a macro to change Outlook option (swap time zones)
Hi all,
I travel often between time zones and Outlook second time zone is a save. There is an Oultook option called "Swap Time Zones", which allows me to, actually, swap primary and secondary time zones. At the same time, time zone is automatically changed in Windows.
In order not to go too deep in the menus, I want to create a ribbon button to swap time zones with a single click. However, the command is not on the list of available ribbon commands. Therefore I wanted to create a macro, which then can be linked to a ribbon button.
Please help me, how do I find the command (Swap Time Zones) in VBA for Outlook.
Thanks in advance.
Regards.
Restrict received time in email item in vbscript
I got the below error when I want to restrict the received time over 3 days old, please help. Many thanks.
startTime = FormatDateTime(DateAdd("d", -3, Date()), vbGeneralDate)
restriction = " [ReceivedTime] > '" & startTime
Error: Cannot parse condition.Error at "15/04/2016".
Source: Microsoft Outlook.
Marshal.ReleaseComObject is slow on Redemption.MessageItem
Hi,
the execution of Marshal.ReleaseComObject on a Redemption MessageItem requires about 500 msec.
We are using Redemption v5.10.0.4312.
Do you have any idea how to speed this up?
Thanks
Christian
How can I identify why emails are not grouping into the same thread (conversation)
Emails we are sending are not being grouped into the same thread in Outlook. However, they are being grouped into the same thread in other well known products. I saw from another question (https://msdn.microsoft.com/en-us/library/office/ff860742.aspx) that Outlook uses a normalized subject to for creating conversations.
Can you give any more details about the algorithm? Is there any way I can debug to identify why the email are not being grouped into the same conversation?
I can also provide full email details, but not publicly.
Problem with Filter property on Outlook's AutoFormattingRule object
Hi,
I'm having problems with programmatic creation (e.g. VBA) of conditional formatting rules in folders/views in Outlook utizling this API:
https://msdn.microsoft.com/en-us/library/office/ff866587.aspx
When adding a new AutoFormatRule to a view programmatically, the Filter property is not properly set it seems, with the result that the rule is applied to all items in the folder, not just the ones selected by the filter expression.
For example:
var view = application.activeExplorer.curentFolder.currentView;
var rule = view.autoFormatRules.add("Underline tests");
rule.font.underline = true;
rule.filter = "\"urn:schemas:httpmail:subject\" LIKE '%test%'";
rule.enabled = true;
view.autoFormatRules.save()
view.save();
Effects:
- All items underlined, not just the ones with word "test" in subject.
- In the Conditional Formatting dialog in the Outlook UI, the Filter dialog looks empty.
- In the debugging console, if I call view.autoFormatRules("Underline tests").filter after the view.save() statement in the script above, the error message "Invalid procedure call or argument" is printed to the console.
Grateful for any clarification!
Thanks,
Mats
VBA script not running...Im not sure how to debug
I recently created a simple Outlook VBA script using the following code:
Sub SetAFforItem(e As Outlook.MailItem)
If InStr(e.Body, "Attachment Fingerprint") > 0 Then
AF = Mid(e.Body, InStr(e.Body, "Attachment Fingerprint"), 88)
e.UserProperties.Add "ADString", olText, True
e.UserProperties("ADString") = AF
e.Save
End If
End Sub
I created a new client-side rule that I will manually run periodically as new messages are directed to a subfolder within my inbox. Rule actions are: Apply this rule after message arrives | on this computer only | run 'Project1.ThisOutlookSession.SetAFforItem
The first time I ran it...it was successful. For whatever reason...Im no longer able to run the script. When I attempt to run the rule and subsequent script...the task bar progresses for like 1 second then stops. I have no indication of what happened. I'll admit that Im a VBA newbie so Im not really sure on how to debug this script or insert breakpoints, watchers, etc.
Any help would be greatly appreciated.
Im running Outlook 2016 C2R from my office 365 tenant.
(First release for current branch...16.0.6741.2025)