Is there an event when user types a subject? - vba

I want to autofill a subject based on what the user types in to the subject field of an email. For example, the user starts typing T201234567 and the program will fill in the rest.
T201234567 SR9&54 Project title
I found the event for when a new email is created, but I would ideally like to have this program be as unobtrusive as possible, so it would only suggest titles, as the user is typing in something it recognizes.
So, is there an onKeyPress event for the subject field?

No, there is no such event. PropertyChange ("Subject") event will fire only when the user tabs out of the Subject edit box.
You can find the control's handle using Win API and intercept its Windows messages, but you cannot do that in VBA.

Related

Outlook Forms: Recipient does not receive form, only message body //How to store form's data in an email?

I am currently trying to create a form in Outlook. I want to be able to send this form to different people so that they can make changes to the form and send those changes back to me as a response.
I have a published form in the meantime. My current problem: The recipient does not see the form until he "undocks" the email from the Outlook app and the changes made there are not transmitted to me; I just get an empty form. How or where can I save this data that the recipients enter? I am grateful for any help!
The form definition includes all the fields and the code that you add to the form. As a general rule, publish the form definition to a forms library instead of sending the form definition with the item. If you cannot publish your form to a forms library, you can select the Send form definition with item check box on the Properties page so that other users can see the form pages when they receive items that are composed by using the form.
Forms that you only intend to use once and not publish are referred to as one-off forms. Because of security concerns with one-off forms, users might not see the form correctly when they open items sent to them with a one-off form. In this case, sending the form definition with the one-off form provides the necessary information required to display the form correctly for the users.
To change how users reply to your form, click the Actions page. The Actions page lists the default Reply forms that are available. You can also add your own custom Reply forms. For example, forms based on a new email message have built-in Reply, Reply to All, Forward, and Reply to Folder forms. When users receive your form, the form contains buttons and menu commands so that users can respond to the form. You can disable some or all of these default forms and set attributes that define how these Reply forms appear.
Read more about that in the Create an Outlook Form section of MSDN.

how to display some message once user starts to compose new email

For Office 365 Outlook Web App, we would like to convert attachments to links once end user uploads them, however we didn't see an attachment notification event at current Outlook Addin.
Another approach we could do is to ask them to use our own buttons for uploading, however we need to guide end user to use our own buttons, could we add some message at top of email body like below once new email message box is displayed?
Somehow based on our research, Outlook Addin only has one event right now which is SendEvent, could someone confirm this? if so, it is rather limited.
To display a custom message use Office.context.mailbox.item.notificationMessages object. For example to add a message to current item the code may looks like ...
Office.context.mailbox.item.notificationMessages.addAsync("information", {
type: "informationalMessage",
message : "My custom message.",
icon : "iconid",
persistent: false
});
Be aware there are a maximum of 5 notifications per message and maximum length of each message text is 150 characters per Office.NotificationMessageDetails interface.
For the secondary question you would need to look at available events in Office.EventType enum. Over here you'll see few events available to Outlook app. One of them you are interested in is AttachmentsChanged which is currently available only in Preview (not released yet, but will be soon).

Is it possible to add user tracking method in EDM (Electronic direct mailer) Email click?

Here is the scenario:
We have designed an email template in which there are two option buttons: "Yes" & "No".
We send this email template to a group of user email lists.
After that, can we track the event where a recipient clicks on either the Yes button or No button.
which method can be used to track down how many of the recipients had clicked the Yes button or the No button?
how difficult is it to track the selected option Yes/No made by each single user?
which tracker is preferred: database tracker, google analytics tracker, mailchimp or other 3rd party web services?
With Google Analytics, you can do manual campaign tagging where you assign specific query parameters to each button. The query parameters will track back to your Google Analytics data, and can tell you which buttons were clicked. This is an easy method as all you need to do is build specific URLs for each button, and then embed those URLs into the email template for each button.
Here is the URL Builder site: https://support.google.com/analytics/answer/1033867?hl=en

Accessing control events of email form

I am trying to develop an add-on for outlook which requires handling control changes.
For instance I need to do some stuff when email subject is changed. To do this, I need to access text change event of subject texbox.
I was just wondering whether anyone has done such thing or not?
Thanks
Check the PropertyChange event:
Occurs when a standard property (for example, Subject or To) of a
Microsoft Outlook item is changed. The property name is passed to the
event so that you can determine which property was changed.

Word VBA event for detecting text change in the document?

I'm working on a macro for Word which detects key words in the text while these are typed.
for example, I want that a Table will be added when the user types \table or something like that.. very similar to lyx context, but yet nothing like it.
The table example is very simple compare to the ideas I want to implement with this.
I'm looking for an event in VBA that will be triggered whenever the used types something.
There is an event called WindowSelectionChange (Reference: Event - Document Edited) but it triggers only whenever the SELECTION is changed, meaning only when the user selects another area in the document with the mouse cursor, or whenever the user moves with the keyboard arrows in the document, but doesn't triggers when the user types text (or press Enter, Space, etc...).
Seems an answer is explained here:
What events can I use to monitor users typing in Word?
Shortly - no events on type text in word: use either Windows API hooks, or assign key bindings to all keys.