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

How do I get ItemSend to kick in when an E:Mail is generated by an application ?

$
0
0

This is regarding some older stuff, VBA and Outlook 2007, but I can't get an answer anywhere ... massive thanks to anybody that can help :-)

If I create a new E:Mail and click "Send", the Application_ItemSend VBA code that I have created cuts in and intercepts the E:Mail.


However, if the E:Mail is created by a particular Application that I use and I click on the "Send" button, the code doesn't cut in ... why would this be ?!?!?

What could be different with the Send E:Mail Form that I create and the Form the Application creates ? Am I able to influence this to make my VBA code cut in ?

Many thanks if you can help :-)


You don't have the license required to use this ActiveX control

$
0
0

Hi

When I try to send email via Outlook 2010 in code I get the 'You don't have the license required to use this ActiveX control' error on below line;

Set OutlookApp = CreateObject("Outlook.Application")

The background is that MS Office Home and Business 2010 was installed with MS Access trial option. Once the  MS Access trial expired we removed the trial from under File->Help. In Outlook under File->Help it says product activated. Outlook otherwise works fine. I have un-installed and reinstalled MS Home and Business 2010 but no luck. What can I do to fix this error please?

Thanks

Regards


Catastrophic failure when executing linq query in Outlook Add-in

$
0
0

I'm executing following code line to check the passed folder is already available in an existing list.

int foundIndex = folderList.FindIndex(search => search.Folder.EntryID== subFolder.EntryID);

When this line gets executed, an exception as

"Catastrophic failure (Exception from HRESULT: 0x8000FFFF (E_UNEXPECTED))" is being thrown. This exception is thrown only when I try to load the add-in through "Manage COM Add-ins" window by clicking on "always enable this add-in" button.

Any idea why this is happening ? I'm using windows 8.1 and outlook 2016.

OL 2016 Set Storage Folders

$
0
0

For some time I have been using VBA code shown here to set the storage folders for sent mailhttp://www.outlookcode.com/d/code/setsavefolder.htm this has worked fine in various versions of Outlook, including 2016.

However whilst it was working fine in OL 2016 in the last two days the function has not been available. Nothing I am aware of has been changed, or any software been added, current Office branch being v16.0.6366.2056

I'm puzzled

T/Y

OfficePresenceLogging in Outlook 2013

$
0
0

I am developing an IM provider for Outlook 2007 / 2010 / 2013. I noticed that enabling the office presence logging like described here:http://technet.microsoft.com/en-us/library/ff678502.aspx doesn't work with Outlook 2013 anymore. It work fine with 2007 and 2010 but no log file is created if I use 2013.

Maybe an expert like 'Dave V' or anyone else knows how to enable it in 2013?

Thanks in advance!


Save attached files

$
0
0
I receive a daily email that includes an attached Excel file. I then have to save that file to a directory on our local server and Delete 3 Rows form the spreadsheet and import it into MS Access to run an append query to get all new records in the spreadsheet imported to a table.  I have the import routine and the append query automated through MS Access but I would like to automate saving the file from the email anyone know how I can do this in Outlook?

Outlook presence debug log file open/read EnablePCXLogging

$
0
0

Hi,

I'm developing IM client for office 2016 as described in https://msdn.microsoft.com/en-us/library/office/jj900715.aspx and  I have enabled presence debug logging as described one of the Microsoft forum as 

[HKEY_CURRENT_USER\Software\Microsoft\Office\15.0\Common\General]

Dword: EnablePCXLogging

Value:1 = Enabled

Value:0 = Disabled

With this registry key in place, logs will be created in the following folder location:

 “%localappdata%\Microsoft\Office\15.0\PCX\Tracing”

Log files are generated, but I could not read the log files as these are binary etl file(by default its opening in

windows performance Analyzer too, I don't see any useful info for me).

can some body suggest how to go ahead with this.

-


Balamurali C


Why Mail is getting stored in Outbox, once user click on send button on outlook?

$
0
0

application = new Outlook.Application();
mailItem = (Outlook.MailItem)application.CreateItem(Outlook.OlItemType.olMailItem);
mailItem.Display();


//This is only happening if Outlook is closed and create new mail window is opened using code. I can understand that as soon as user click on send button the OUTLOOK.EXE process is getting closed.

How can I force outlook to send mail before getting closed.

Thanks,

Sumit


Outlook Forms - Inserting a ListBox Control

$
0
0

Hello everybody,

I am trying to create an Outlook Form to run on a daily basis that includes daily data.  

I'm trying to insert a ListBox that populates this daily data from an Excel workbook range. But I couldn't make it work with RowSource property.

Any answers on it?

Thanks.

Outlook: Create Contact in a PulicFolder

$
0
0

Hi,

I can create a new contact in the Contacts with the following code.

How can I create a new Contact in a specific PublicFolder using its StoreId?

Application olApp = null;
_ContactItem olContactItem = null;

try
{
olApp = new Application();
olContactItem = (_ContactItem)olApp.CreateItem(OlItemType.olContactItem);
olContactItem.BusinessTelephoneNumber = "123";

olContactItem.Save();
olContactItem.Display(true);
Thanks
Christian


Outlook 2010: macro buttons not working

$
0
0

Hello,

I have created 2 outlook macros that both work fine when run from the Visual Basic editor. I have created buttons linking to those, but unfortunately nothing happens when I click on those.

The buttons are located on the Home tab. You can see them change color & shape when hovering and clicking them, but nothing happens when clicking them.

This on Windows 7 SP1 32-bit & Outlook 2010 (14.0.6112.5000).

Any help appreciated. Thanks!

Chris.

Add account Outlook programmatically

$
0
0

Hello,

first sorry for my english this isn't my favourite language (i find nothing on french forum :)

So i want to add account on outlook programmatically (c#)

My application ask at user: Email adresse, Name and Password. He click on a launch button and my programme configure automatically his account on Outlook.

Im using redemption and profman lib but i don't know how to use it correctly. How can i do ?

Second question, is it possible to do that without this library ?

Thank's 



Outlook 2010 Shared Calendar Export

$
0
0

Hi,

I have the below code, which will export my own calendar - how do i specify the other shared calendars i want to export to the same file?

Sub ExportAppointmentsToExcel()
    'On the next line, edit the list of calendars you want to export.  Each entry is the path to a calendar.  Entries are separated by a comma.
    Const CAL_LIST = "tul0crf@123.com\Calendar"
    'On the next line, edit the path to and name of the Excel spreadsheet to export to
    Const EXCEL_FILE = "\\ketpddsc01\users\tul0crf\Tester.xlsx"
    Const SCRIPT_NAME = "Export Appointments to Excel (Rev 2)"
    Const xlAscending = 1
    Const xlYes = 1
    Dim olkFld As Object, _
        olkLst As Object, _
        olkRes As Object, _
        olkApt As Object, _
        olkRec As Object, _
        excApp As Object, _
        excWkb As Object, _
        excWks As Object, _
        lngRow As Long, _
        lngCnt As Long, _
        strFil As String, _
        strLst As String, _
        strDat As String, _
        datBeg As Date, _
        datEnd As Date, _
        arrTmp As Variant, _
        arrCal As Variant, _
        varCal As Variant
    strDat = InputBox("Enter the date range of the appointments to export in the form ""mm/dd/yyyy to mm/dd/yyyy""", SCRIPT_NAME, Date & " to " & Date)
    arrTmp = Split(strDat, "to")
    datBeg = IIf(IsDate(arrTmp(0)), arrTmp(0), Date) & " 12:00am"
    datEnd = IIf(IsDate(arrTmp(1)), arrTmp(1), Date) & " 11:59pm"
    Set excApp = CreateObject("Excel.Application")
    Set excWkb = excApp.Workbooks.Add()
    Set excWks = excWkb.Worksheets(1)
    'Write Excel Column Headers
    With excWks
        .Cells(1, 1) = "Calendar"
        .Cells(1, 2) = "Category"
        .Cells(1, 3) = "Subject"
        .Cells(1, 4) = "Starting Date"
        .Cells(1, 5) = "Ending Date"
        .Cells(1, 6) = "Start Time"
        .Cells(1, 7) = "End Time"
        .Cells(1, 8) = "Hours"
        .Cells(1, 9) = "Attendees"
    End With
    lngRow = 2
    arrCal = Split(CAL_LIST, ",")
    For Each varCal In arrCal
        Set olkFld = OpenOutlookFolder(CStr(varCal))
        If TypeName(olkFld) <> "Nothing" Then
            If olkFld.DefaultItemType = olAppointmentItem Then
                Set olkLst = olkFld.Items
                olkLst.Sort "[Start]"
                olkLst.IncludeRecurrences = True
                Set olkRes = olkLst.Restrict("[Start] >= '" & Format(datBeg, "ddddd h:nn AMPM") & "' AND [Start] <= '" & Format(datEnd, "ddddd h:nn AMPM") & "'")
                'Write appointments to spreadsheet
                For Each olkApt In olkRes
                    'Only export appointments
                    If olkApt.Class = olAppointment Then
                        strLst = ""
                        For Each olkRec In olkApt.Recipients
                            strLst = strLst & olkRec.Name & ", "
                        Next
                        If strLst <> "" Then strLst = Left(strLst, Len(strLst) - 2)
                        'Add a row for each field in the message you want to export
                        excWks.Cells(lngRow, 1) = olkFld.FolderPath
                        excWks.Cells(lngRow, 2) = olkApt.Categories
                        excWks.Cells(lngRow, 3) = olkApt.Subject
                        excWks.Cells(lngRow, 4) = Format(olkApt.Start, "mm/dd/yyyy")
                        excWks.Cells(lngRow, 5) = Format(olkApt.End, "mm/dd/yyyy")
                        excWks.Cells(lngRow, 6) = Format(olkApt.Start, "hh:nn ampm")
                        excWks.Cells(lngRow, 7) = Format(olkApt.End, "hh:nn ampm")
                        excWks.Cells(lngRow, 8) = DateDiff("n", olkApt.Start, olkApt.End) / 60
                        excWks.Cells(lngRow, 8).NumberFormat = "0.00"
                        excWks.Cells(lngRow, 9) = strLst
                        lngRow = lngRow + 1
                        lngCnt = lngCnt + 1
                    End If
                Next
            Else
                MsgBox "Operation cancelled.  The selected folder is not a calendar.  You must select a calendar for this macro to work.", vbCritical + vbOKOnly, SCRIPT_NAME
            End If
        Else
            MsgBox "I could not find a folder named " & varCal & ".  Folder skipped.  I will continue processing the remaining folders.", vbExclamation + vbOKOnly, SCRIPT_NAME
        End If
    Next
    excWks.Columns("A:I").AutoFit
    excWks.Range("A1:I" & lngRow - 1).Sort Key1:="Category", Order1:=xlAscending, Header:=xlYes
    excWks.Cells(lngRow, 8) = "=sum(H2:H" & lngRow - 1 & ")"
    excWkb.SaveAs EXCEL_FILE
    excWkb.Close
    MsgBox "Process complete.  I exported a total of " & lngCnt & " appointments were exported.", vbInformation + vbOKOnly, SCRIPT_NAME
    Set excWks = Nothing
    Set excWkb = Nothing
    Set excApp = Nothing
    Set olkApt = Nothing
    Set olkLst = Nothing
    Set olkFld = Nothing
End Sub

Private Function OpenOutlookFolder(strFolderPath As String) As Outlook.MAPIFolder
    ' Purpose: Opens an Outlook folder from a folder path.
    ' Written: 4/24/2009
    ' Author:  David Lee
    ' Outlook: All versions
    Dim arrFolders As Variant, _
        varFolder As Variant, _
        bolBeyondRoot As Boolean
    On Error Resume Next
    If strFolderPath = "" Then
        Set OpenOutlookFolder = Nothing
    Else
        Do While Left(strFolderPath, 1) = "\"
            strFolderPath = Right(strFolderPath, Len(strFolderPath) - 1)
        Loop
        arrFolders = Split(strFolderPath, "\")
        For Each varFolder In arrFolders
            Select Case bolBeyondRoot
                Case False
                    Set OpenOutlookFolder = Outlook.Session.Folders(varFolder)
                    bolBeyondRoot = True
                Case True
                    Set OpenOutlookFolder = OpenOutlookFolder.Folders(varFolder)
            End Select
            If Err.Number <> 0 Then
                Set OpenOutlookFolder = Nothing
                Exit For
            End If
        Next
    End If
    On Error GoTo 0
End Function

Thanks,

Cam


HTML controls are not appearing properly in the email on Outlook 2010

$
0
0

Hi Team,

We need your help in sorting out our problem.

The HTMl Control Like Textbox, Radio Buttons, Buttons, Drop downs(input type 'select') are not displaying in the Outlook 2010. And is there any possibilities to send html mail on submit of HTML button in  outlook mail.

For example, 1. We have Feedback html form with some html controls like textbox, radio button, dropdown and a submit Button.

2. The user will get the above HTML Feedback form. He will fill the details and click on Submit Button.

3.My question is whether we can write the server side code for the form submit. 

Please suggest us ASAP.

Thanks 

Suresh

script on unclaimed emails + appearance of popup message on them after 30 minutes

$
0
0
Hello Team, i work on a generic mailbox using outlook 2013. here is below what i'm looking for: when we receive new emails and no one claim them, i need a popup message to appear after 30 minutes on unclaimed Emails saying " you need to claim or flag this email(adding the subject email in the popup msg)". i really appreciate if you help me with this. thank you in advance team best regards, Sami Jacoub

Signing Office Macro (.dot file)

$
0
0

I can sign Office Macro (.dot file) in Office 2013 according the Microsoft procedure:

https://support.office.com/en-us/article/Digitally-sign-your-macro-project-956E9CC8-BBF6-4365-8BFA-98505ECD1C01

The problem is that the macro is OK only on machines with Office 2013.
Office 2010 doesn’t validate the certificate.

I tried to sign the macro at machine with Office 2010.
However, Office 2010 doesn’t recognize installed certificate, so signing is impossible at all.

I use PFX certificate file.

I would appreciate any comments.

Thanks,
Jarek Madziar

Calendar REST API - avoid sending updates

$
0
0

We are using the Office 365 Calendar REST API to automatically add events to a calendar according to information in a planning system. Events represents lectures and the attendees are students attending the lecture.

We would like to add an attendee to an event without sending a notification to all other attendees.

Is this possible using the REST API?

Best regards

Mike

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


Repurpose Private button on Calendar appointment

$
0
0

Hi,

I am trying to re-purpose private button in outllok 2010/2013 on the context menu of outlook appointment item.

I am using follwing xml

<contextMenus>
    <contextMenu idMso ="ContextMenuCalendarItem">
      <toggleButton idMso="Private" onAction="GetButtonID" />
    </contextMenu>
  </contextMenus>

it seems like xml is correct because by setting isVisble to true/false i can see private button appears/disappears correctly.

But OnAction does not seems to work. its never being called

Public Sub GetButtonID(ByVal control As Microsoft.Office.Core.IRibbonControl, ByRef pressed As Boolean, ByRef cancel As Boolean)
        MsgBox("herre")
    End Sub

I am not sure if definition of above method is correct.

Also, in outlook 2007 i am using same techinique but it seems like the xml never get implemented. the firts if condition works in outlook 2010 but not in outlook 2007. 

Public Function GetCustomUI(ByVal ribbonID As String) As String Implements Office.IRibbonExtensibility.GetCustomUI
        If (ribbonID = "Microsoft.Outlook.Explorer") Then
            Return GetResourceText("XMLAbove")
        End If
        If (ribbonID = "Microsoft.Outlook.Appointment") Then
            Return GetResourceText("anothexml")
        End If
        Return Nothing

    End Function

Let me know what changes i can make to get it working in both outlook 2007 and 2010.

Thanks

 Nit

Email not working after upgrading to Outlook 365

$
0
0

Hi 

We have a .Net Application, through which mails are sent 

The Configuration setting that the Application used earlier is :-

<add key="EmailServer" value="127.0.0.1"/>

Now, when the mail server is upgraded to Outlook 365, mails are not working.

Please suggest any workaround / resolutions for this issue i.e. any change in Email server SMTP or any other changes.

Thanks,

David


DAVID

Viewing all 6421 articles
Browse latest View live


Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>