Target an opened outlook message with an attachment - outlook

I am trying to target an open outlook message with an attachment. How can this be done? Do I use the inspector property? Please help!

Application.ActiveInspector.CurrentItem.Attachments.Add("c:\temp\myfile.txt")

Related

Outlook change mail content before it is rendered in read mode

Is there a way, to manipulate what the user is seeing in the Outlook read window?
I have some corrupt EML files, that have to be shown in Outlook after downloading them. So what I need is some extension point to run some js code before the user sees the content.
I already have an addin deployed and I found this topic: https://learn.microsoft.com/en-us/office/dev/add-ins/outlook/autolaunch
Which looks kind of promising, except there is no event that is triggered when the email viewer is loaded. Does anyone know a way to intercept the viewer screen?
OfficeJS doesn't provide anything for that nowadays.

How to open Outlook Contact or Calendar from an email link or webpage?

Is it still possible to use Outlook URLs to open Open Outlook items such as Calendars or Contacts as per the below article...
How to open Outlook Calendar from an email link or webpage?
If you register the Outlook protocol like described in the Shortcuts and the Missing Outlook:// Protocol article you can open items.
You can link to a globally unique identifier (EntryID) that is created for an item and doesn’t change when you rename or move it:
Outlook:000000000EAE44133243899468AC478B31C0BANDHEWR324
It is best to use the GUID URL since you don’t have to worry about changes breaking the link. If you are after a outlook message, all you have to do is select that message in outlook, and then left-click on the linker icon on the lower right of the taskbar so that the link will get copied. Next, you will just have to paste it somewhere. It works the same way for contacts and even calendar events.

Outlook Addin How to Make Custom Tab Show Only in New Message Compose Window

I'm sure there's a simple way to do this that I am overlooking. But, how do you make a custom tab in the Ribbon.xml show up only in the new message compose window? I want to have my own tab so that the ribbon for my groups and buttons will be clean.
I am currently doing a workaround to invalidate the tab control when a new mail item event happens, but there must be a simpler way to do this.
Any suggestions would be appreciated.
It's Outlook 2016 desktop in Windows 10.
Thank you.
Your ribbon XML must specify only Microsoft.Outlook.Mail.Compose - see https://learn.microsoft.com/en-us/visualstudio/vsto/customizing-a-ribbon-for-outlook?view=vs-2019

How to create a permanent notification in a new Outlook message?

(screenshot that shows WebExtNotifications )
Is there a method to programmatically create a permanent notification like shown on the screenshot without "Dismiss this message" link?
If WebExtNotifications property is documented anywhere?
Thanks,
Victor Ivanidze
You can create a task pane aligned to the top. That pane is free to display anything it wants using any controls.
You could try to Office.NotificationMessages interface, it is returned as the notificationMessages property of an item.
For more information, Please refer to these links:
Office.NotificationMessages interface
Office JavaScript API support for content and task pane add-ins in Office 2013

Outlook Email Template With Input Box

I wonder whether someone could help me please.
Firstly, I'm not even sure whether this is possible but I thought I'd ask.
I have a serious of Outlook Email templates which I want to adapt so that the operator can enter a recipients name, a user name and password.
Could someone tell me please whether this is possible and if so, how I would go about developing this.
Many thanks and kind regards
Chris
Outlook doesn't provide anything for that out of the box. But you can develop a VBA macro or COM add-in which can get the user's input and paste it to the email where required. See Getting Started with VBA in Outlook 2010.
You may find the How To: Create a new Outlook message based on a template article helpful.

Resources