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

Disable or hook into new @mentions feature in Outlook 2016 insider builds

$
0
0

The latest Outlook 2016 insider builds ads a new @mentions feature described here https://support.office.com/en-us/article/Use-mentions-to-get-someone-s-attention-90701709-5dc1-41c7-aa48-b01d4a46e8c7?ui=en-US&rs=en-US&ad=US

Unfortunately for me this conflicts with very similar functionality that my company has developed in our C# COM addin.

Is there any way that I can tell if this new feature is available in the version of Outlook the user is running, or some event I can hook into so I know when it's happening so I can add our functionality to it, or just disable it entirely so that it doesn't interfere with our version?

Thanks,

Ben


crash of Outlook

$
0
0

I'm wring my own Store-Provider. Now, my folder-objects inside (in fact the root-folder) get's a QueryInterface call for the interface {02813F9B-751C-4f59-8C7D-D93842DB05E0}. I don't know what this is. And, because I know, that I don't know it, I return E_NOINTERFACE (same as MAPI_E_INTERFACE_NOT_SUPPORTED). Additionally I set the pointer returned to NULL... (that's how COM works and that's how COM and MAPI documents what we should do).

But, my problem is, that I get null-pointer exceptions. So, I was wondering why. And then I guessed, it could be because of those query's. What I changed was, that I don't set the pointers to NULL, but to some markers (e.g. 0x112833812, just for fun). And now I saw it. The crash happens, because of impossible accesses to those addresses.

My question here now: WHY DOES OUTLOOK USE POINTERS TO INTERFACES THAT I TOLD HIM I DON'T HAVE? I'M RETURNING E_NOINTERFACE !!!!!!!!!!!!!!! ... that's the first one. And the second question is: How the f* can I solve this now? Why do I get those calls? How can I prevent it from happening or how can I answer them? (those interface ids are completely unknown to me!)

... I really LOVE such things. That's the fun part in my job. Really!!!!!!!!!

By the way, that's Outlook 2010 ... (has to work on 2010 - 2016, but I'm developing on 2010)

Rudolf

CreateItemFromTemplate doesn't work with a shared mailbox that's automapped as well as added to the profile

$
0
0

Hi everyone.

We have several users that works for 2 of our companies (approximately 80/20).

Therefore we've created a shared mailbox for each of them to use when responding to mails from the second company and to book meetings from, using our own CRM system.

These mailboxes have been created with AutoMapping enabled.

Some of our users have then added the mailboxes to their Outlook profile, using the Add Account function in Outlook because this enables then to set up a signature for that account (this you cannot do with an automapped mailbox).

However this results in the meeting appointments being send from the primary mail account every time when the appointment is created from within our CRM system, using the following code:

    Dim appOutlook As Outlook.Application
    Set appOutlook = GetObject(, "Outlook.Application")
   
    Dim nsTemp As Outlook.NameSpace
    Set nsTemp = appOutlook.GetNamespace("MAPI")
   
    Dim recTemp As Outlook.Recipient
    Set recTemp = nsTemp.CreateRecipient("<e-mail address of shared mailbox>")
    recTemp.Resolve
   
    Dim folTemp As Outlook.Folder
    Set folTemp = nsTemp.GetSharedDefaultFolder(recTemp, olFolderCalendar)
   
    Dim appTemp As Outlook.AppointmentItem
   
    Set appTemp = appOutlook.CreateItemFromTemplate("<path to template>", folTemp)
    appTemp.Display

If I then remove the AutoMapping from the shared mailbox, the code works as expected and the meeting appointments are sent out as the secondary mailbox.

We run Outlook 2016 (patched in august 2016) and Exchange 2010 SP3.

Anybody got a solution to this that doesn't require AutoMapping to be disabled?

Regards, Martin

Automatically Send an email to a user if an email from a user has not been received by a specified time.

$
0
0

I have to compile data for a report and am tired of having to send emails to remind people to send me their data.  I would like a way to send a reminder email to someone if I don't receive an email from them with specific text in the subject.  The reminder email should start to be sent on a Wednesday and continue through Friday being sent at a certain time each of those days. Once the expected email is received the macro should stop.  There should also be a way to easily stop the macro form executing for any given span of time (like for vacation and such).

Thanks in advance!

Regards,

-Heinz Gruber

Update Folder favorite is grayed out in Outlook 2016

Import VBA module for Outlook using Powershell

$
0
0

Hi I am trying to import VBA module for Outlook using Powershell. I know there is something for Excel but i dont see anything for Outlook when i searched.

For Excel below is the blog that tells how to import module 

https://social.technet.microsoft.com/Forums/office/en-US/f3bcd564-d7e0-4a80-bf4e-120eefc8ccd1/using-powershell-to-add-vba-to-an-excel-spreadsheet?forum=winserverpowershell

But for Outlook i dont see anyway to add VBAcomponents like below

VBProject.VBComponents
Add-Type -AssemblyName Microsoft.Office.Interop.Outlook

$Outlook = New-Object -ComObject Outlook.Application

if we have similar in Outlook then it will be easy to distribute VBA modules to mulitple users using powershell script.

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.

Referencing a template in a shared folder

$
0
0

I have created a form which I have placed in a public folder.

I would like to create a macro so that, by clicking a button, the form will be displayed.

I know how to do this with local oft files, but I don't know how to reference the form in a public folder.

TIA

--Ephraim


Opening a 64 bit Outlook Archive on a 32 bit version of Outlook

$
0
0

Hello Everyone;

Recently I installed the 64-bit version of Outlook 2013 on my PC running Windows 7 Pro. Unfortunately I have a program that interfaces with Outlook but no longer runs because it was built on a 32-bit architecture. To solve this, I'm thinking I uninstall the 64-bit version of Outlook, and clean install the 32-bit version (both 2013). I also want to archive my entire Outlook library before uninstalling so I don't lose my emails.

Does anyone know if I'll be able to open the 64-bit archive on the 32-bit version of Outlook? If I can't, I'm thinking I either convert the archived .pst file to a single pdf, or I download software to view the archived .pst file. If you guys have any thoughts of those alternatives let me know as well.

Thanks,

Jon

Is it possible to build msi installer for Outlook Add-in so that it can be run as non-admin user?

$
0
0

Hi All,

I'm working on an msi installer which is for an Outlook Add-in. We are trying to build it to install per user base instead of per machine. And it would need to be run by the user itself.

It's written in C++ and build with VS2010. I saw in the dll output there is an option called "Register". It was originally set to vsdrpCOMSelfReg and when the user runs the msi installer, it would require admin permission.

If I changed it to vsdrpCOM or vsdrpDoNotRegister, it can be installed with non-admin user but the Outlook won't load it. And I need to run the following command as admin user to make Outlook load it.

regsvr32 xxx.dll

I did some search online and looks like the regsvr32 simply requires the admin rights

Also I've made the program to write only to the current user's profile folders and write the registry keys to only HKCU. Only some registries (related CLSID) are written to HKCR. I've tried to change that to write into HKCU but that won't work. 

Does anyone know if there's any way to go around this? Or can anyone confirm that it would always require admin rights to install Outlook Add-in?

Thanks




How to find folder to store an incoming message

$
0
0

I have a fairly large number of folders (that I can't remember all the names). Some incoming messages I'd like to move to a more permanent folder.  I tried searching for a relevant name that I think the message belongs to and  get a list of messages. Some of those messages are stored in the sub-folder to which I'm looking to move my current message.

My problem is that from the list of messages that are the result of the search, there's no mention of the folder that CONTAINS the message.

How can I find a folder by searching for a typical message held within that folder (and others - I can tell the folder I want if I can see a list).

Ed Mitchell


Edward E. L. Mitchell Phone: (239)415-7039 12214 Lakewood Court Fort Myers, FL 33908

FileDialog in Outlook 2013

$
0
0

Hi

I am using Outlook in Office 2013 on Windows 7 (64 bit).

I am trying to use a file dialog box via excel which works fine when the IDE is open but when the IDE is closed the file dialog box does not open onto the screen.

The only way I can show it is to open the Task Manager, select the dialog box window and click SwitchTo. 


Any help would be appreciated.

Code is as follows:

Sub SelectAFolder()
    Dim fd As Office.FileDialog
    Dim oxl As Object
    Set oxl = CreateObject("Excel.Application")
    Set fd = oxl.Application.FileDialog(msoFileDialogFolderPicker)
    
    fd.Title = "Select folder"
    fd.AllowMultiSelect = False
    
    If fd.Show = -1 Then
            MsgBox "Selected Folder: " & fd.SelectedItems(1)
    End If
    
    oxl.Quit
    Set oxl = Nothing
End Sub

How to Import a Comma Separated Value (CSV) File to Outlook with VBA

$
0
0

Hello everyone,

I need some help optimizing a process for my company. We are a fast-growing company that has a very high client turnover, so it is pretty hard to keep database related issues up to date. For this reason, I started a VBA course to see if I could find a solution somehow. Right now I am trying to keep our distribution lists automatically updated. I have wrote a code to extract some .csv files from our database in excel and my challenge is how to import them into different distribution lists in Outlook.

I used to do this process manually, but we currently have 7 different .csv files, each representing a different distribution list and this would take up to an hour a day to be done.

This is how the manual process goes:

- Import the first .csv file into a specific contact folder, mapping the name and e-mail in its respective fields;
- Create a new distribution list for the contacts that were just imported, import them into it and save as a name of choice;
- Delete contacts from the specific contact folder that they were imported to;
- Repeat the same process for the next .csv file.

Is there any way someone could point me in the right direction here? I just need to import two different fields: name (first and last name together) and e-mail address.

Thanks in advance!

Erik

Convert .msg file and its attachment to pdf

$
0
0

Hello,

Does anyone know a way of how to create a single pdf file from a .msg file I have on disk (so preferrably attachments of the mail inside the pdf if this is possible)?

I would need this from within code (c#).

Thanks,

Tom

 

How to get the attachments from the outlook item and strip out the binary data from it using C#.

$
0
0

I am working on VSTO addin 2010 and 2007. I need to get the attachments from the outlook item (Email, Task, Appointment) and strip out the binary data from it.

Is it possible to get the attachments from Outlook Object model and strip out the binary data ?

Right now I am using Extended MAPI for the same. It reads the .tmp file created by Outlook when any item is drafted. This file is present in “C:\User\AppData\temp” folder.

If there is no way to get the attachments directly from OOM, is there any way to call a method to read the .tmp file and get the attachments from it and strip out the binary data ?


 

How to save an Outlook item as msg file using C#

$
0
0

I am working on VSTO addin 2010 and 2007.

Currently, I am using Extended MAPI to save the item as msg file. But i need to use Outlook Object Model in my code.

I tried using OOM to save the file in Microsoft.Office.Interop.Outlook.OlSaveAsType.olMSGUnicode format. But it doesn't seem to work.

Is there any alternate way to do the same in C#?

How to reconstruct an Outlook Item in deleted items folder using C#

$
0
0

Hi,

I am working on Outlook VSTO Addin, where I am trying to reconstruct an outlook item (Appointment, Email, Task) using an external application.

By reconstruction, I mean the item is not present in outlook, and it is being constructed with the saved data (from database) after invoking from external application.

In this process, I am using Outlook Object Model to get access of the deleted items folder, and I tried to move the reconstructed item to it, which does not work and it creates the item in my drafts folder as well as an entry to my calendar for appointment item.

Using Extended Mapi property, I am able to do it properly but is there a way to do it through Outlook Object Model (OOM), i.e. creating a reconstructed item in deleted items folder?

Thanks in advance.


Outlook 2010 VBA - SetAlwaysMoveConversation

$
0
0

Hello

Has anyone managed to make this function work, as described at https://msdn.microsoft.com/en-us/library/office/ff865038.aspx? It consistently returns:

Run-time error '-2147221299 (8004010f)':

The attempted operation failed. An object could not be found.

Debug brings it right to the "oConv.SetAlwaysMoveToFolder oFolder, oStore" line.

Any clues? Thanks!

How to format Body of an Outlook Appointment Item using C#

$
0
0

I am working on a Outlook VSTO Addin, where I have the requirement to set following body properties for an Appointment: 

a.)   Rich Text Format (RTF): As per my investigation, Outlook Object Model (OOM) provides the RTF format property for Appointment for Outlook 2010 onwards,

but as I am also dealing with the Outlook 2007 Addin, is there a way to get  RTF format property through OOM apart from Extended MAPI way.

b.)   HTML Format: Is there a way to get the HTML format for Appointment body through OOM for both 2007 and 2010 Addins?

Currently, I have used Extended MAPI property (which internally converts rtf/text to html) to fetch the same as I was not able to get the same through Outlook Object Model.



How to get the organizer of a meeting in C#

$
0
0

Hi,

On creation of new meeting, I am trying to get the (display name and email address of) organizer of the meeting, but as the meeting is not saved/sent, I am getting null value.

I have tried using "AppointmentItem.Organizer" property, as well as the schema "http://schemas.microsoft.com/mapi/proptag/0x0042001E" , both returns null value for new meeting request.

Can anyone help me out to get the correct value for the same.

Correct value implies that it should provide the actual Organizer instead of the current user (specially while creating a meeting in shared calendar)

Thanks !


Viewing all 6421 articles
Browse latest View live


Latest Images

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