Tracking open Outlook 2010 emails - vba

I'm looking for a programmatic way (eg: using VBA) to write the Subject texts of emails which are open, or otherwise export opened emails to a file system folder.

Trap the Application.Inspectors.NewInspector event an read the Inspector.CurrenmtItem.Subject property. Reading pane needs to be handled separately.

Related

Catching "move to explorer" event from Outlook

Recently I have written small tool (vb.net WinForms) for our company that creates structure and archives all Emails that are in x, y Folder in Outlook. This tool then renames and converts these .msg files to .eml files.
Now it would be perfect, if these Emails would automatically convert themself when user places it directly in the destination in Windows-Explorer folder per Drag and Drop. For that I assume I would have to run script/programm whenever Event X (moving Email from Outlook to explorer) occurs.
Has anyone an idea if catching that event would be possible? Or maybe any better ideas? I thought of some scripts that run on server and check for new files (once daily for example), but the first solution is more appearing to me.
You can catch the Items.ItemAdd event on the folder to track and convert new items.
The Outlook object model doesn't provide any events when items are saved to a folder by dragging and dropping items. You can use a file system watcher to track folder changes, see VBA monitor folder for new files for more information.

How to email dropbox app file paths as clickable hyperlinks?

The company uses dropbox instead of local servers. We often send files to colleagues, but each user has a unique path to the file stored in the dropbox desktop app (e.g. C:\Users\username\Dropbox...).
I was thinking about writing a batch script to copy a file path and strip the beginning of the path. I would then need another script to add the user specific prefix to the file path, and then open the folder/file in file explorer.
I believe I found a way to add a batch file into the menu that pops up when you right click a file/folder by editing the registry. I was thinking it would be possible to write an Outlook add-in for the receiving user to prepend their drive/username etc. to the file path and then open the file/file explorer if a path to a folder is sent.
I was hoping to get some input on this approach, or to know if there is an easier way to handle this. I haven't started any of the code yet.
Why don't you just start using the Dropbox add-in for Outlook?
Dropbox has created an add-in that integrates with Microsoft Outlook. By connecting the Dropbox add-in to your Outlook account, you can:
Replace email attachments with a shared link to any file, big or small
Save email attachments that you receive directly to your Dropbox account
Ensure those with access to a file see updates to it (since shared links always point to the latest version of a file, whereas attachments are just a static copy)
Enabling the integration adds a Dropbox icon to the Outlook compose window. When you click this icon a pop-up window appears, allowing you to select from the contents of your Dropbox. A shared link to any selected file or folder will appear in the body of the email.
While this link looks like an attachment, it's, in fact, a shared link. This means no slow-down in sending emails, and no space limitations in your inbox.
Anyway, if you still want to develop an add-in for extracting an attachment's file path you need to start with Walkthrough: Create your first VSTO Add-in for Outlook.
The NewMailEx event of the Application class which is fired once for every received item that is processed by Microsoft Outlook. The item can be one of several different item types, for example, MailItem, MeetingItem and etc. The EntryIDsCollection string contains the Entry ID that corresponds to that item.
The NewMailEx event fires when a new message arrives in the Inbox and before client rule processing occurs. You can use the Entry ID returned in the EntryIDCollection array to call the NameSpace.GetItemFromID method and process the item. Use this method with caution to minimize the impact on Outlook performance.

VB Script for Outlook to automatically copy the file contents to a designated folder with a particular sender or based on Subject?

I am a newbie to VB Scripting, what I have been trying to do is as soon as i receive a mail in Outlook from a particular sender or a particular message in the Subject line, I should copy the contents of the specified File location to other specified location
Is this feasible?
Yes, it can be implemented using VBA macros or creating an Outlook add-in. You can handle the NewMailEx event of the Application class where you can check out the Subject property and do whatever you need. See Getting Started with VBA in Outlook 2010 in MSDN for more information.

SharePoint 2010 Email Outlook File to Library with attachments embedded

The only way I have found to retain attachments with an email from Outlook to SharePoint is to do a save as .msg and drag and drop into the SharePoint library.
I would like to set the library to receive email and retain the attachment as part of the email. I don't want the attachments to separate from the email when they arrive in the library.
Is there an add-in to Outlook or a fix in SharePoint 2010??????
You have two options:
1. Stick with the SharePoint options like adding attachments to the library or to a sub folder of the library based on subject or sender.
2. Write a custom email event handler. Here is an example for 2007, but it should work in 2010 as well: http://blogs.msdn.com/b/malag/archive/2009/05/13/attachments-disappear-with-custom-email-event-handler.aspx
marco
Marco, when I created the EventHandler to try and retain the message and attachment when activated it still came through as it was before by separating the message and attachment in two different files
Yes there are add-ins. I have used some 3rd Party tools for Outlook and SharePoint:
Scinaptic's OnePlaceMail
Colligo
Macroview
They are all good.

Hotkey for moving messages from inbox to archive in Outlook

I'd like to configure a hotkey, in MS Outlook, which does the following to the highlighted/selected messages:
Mark as read (by default it's [crtl]+Q)
Move to an "archive" folder (archive meaning a folder other than the default inbox)
This should happen whenever I press [crtl]+M (assuming it is not already reserved), on any amount of messages I select.
I currently use Outlook 2007.
It might be difficult to assign a Hotkey to a Macro in Outlook, but you can add the Macro as a button in the toolbars.