Outlook 365 Create VBA to automate a direct reply function(Reply-to) [closed] - vba

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 4 days ago.
Improve this question
I'm creating a VBA to automate the function for having to direct customer replies to another email address that was sent from. Currently, I need to manually send an email and manually set direct replies so that when the receiver received the email and click reply it will automatically be redirected to another specified email address.
Currently I'm able to acheive this automation but it has to be manually click on the macro and only available for new emails.
Sub SendEmail()
Dim oApp As Outlook.Application
Dim oMail As Outlook.MailItem
Set oApp = New Outlook.Application
Set oMail = oApp.CreateItem(olMailItem)
With oMail
.Display
.ReplyRecipients.Add "Replyto#example.com"
End With
Set oMail = Nothing
Set oApp = Nothing
End Sub
I need to something to be able to automate the functionality of this whenever I click on New Email and Reply/Reply All for multiple email account in outlook.

Related

How can I know if the mail received is a parent mail using vba

I need to delete all replies and forwards to a mailbox.
I already have disabled the Reply, Reply To All and Forward from my master email template, but some people is using old mails to avoid creating a new one.
I am also checking the email subject for the strings "RE:" and "FWD:" to treat them as I want, but some people change the subject and I don't know how check if it's a original mail (parent mail).
Any suggestions?
Regards,
Elio Fernandes

Track opening rate of Outlook emails being sent through MS Access?

I send MS Outlook emails via MS Access.
Is there any way to check if the emails are being opened or is there a service I can link with this to track the analytics of the email?
‘Code to format email and set it to variable strHTML here
‘code to send email
With cdomsg
.To = emailstr
.FROM = fromemailstr
.subject = Forms!frmMain.txtSubject
.HTMLBody = strHTML
.Send
End With
Set cdomsg = Nothing
open rates are very hard to detect. You have to use outside services to actually detect if your email was opened. Your email will at least have to support html (not text only) to know if it was opened. usually its a reference to in the body of an html email
<img src="http://yourdomain.com/file.jpg?campainid=52&send_method=Access" height=0px;width=0px;">
JavaScript is usually out of the question in emails, but not as much in web mail.
It would be best to use a email tracking provider, then to reinvent this wheel yourself, but you can try with my idea.
There are many other methods out there using email tracking tools

How to connect to a specific email account on Outlook 2016 VBA using Rest API (Not MAPI)

I am currently using Windows 7, Outlook 2010 with Exchange MAPI accounts.
Several users have their personal account + several generic accounts (some with full access, some read only)
The users execute a macro in VBA to connect to a specific mail adress/account to read check the incoming mails from the inbox on different criteria.
This code snipet connects to the MAPI Account and sets the folder to the inbox of a mail account:
Dim ns As Outlook.NameSpace
Dim Inbox As Outlook.Folder
Set ns = GetNamespace("MAPI")
Set Inbox = ns.Folders.Item("jon.doe#example.com").Folders("Inbox")
Now the IT decided to upgrade their servers to Exchange 2016.
Those account will not use MAPI. IT said they now use REST API.
I suppose that's why I now receive this error message, when executing the code above with Outlook and Exchange 2016 and now Windows 10.
I found online several solutions, but all of them need Visual Studio + Addins/Libraries. I want to do this with VBA and also connect to a mail account and inbox, so without Visual Studio, C#.
Best regards
Janko
Now the IT decided to upgrade their servers to Exchange 2016. Those account will not use MAPI. IT said they now use REST API.
This is not technically correct Exchange 2016 doesn't yet support the new Outlook Rest API (although it has been announced that this will be introduced in the future). If you using Office365 then can use REST. Another alternative that will work against any version of Exchange is to use EWS https://msdn.microsoft.com/en-us/library/office/dn567668(v=exchg.150).aspx .
Another thing that should be pointed out is that regardless of Exchange version 2010,2016 or Office365 Outlook uses MAPI to connect to Exchange (along with EWS for various features). The difference between versions is the Method of connection eg in 2016 by default Mapi over HTTP is the preferred connectivity mech in previous versions in was RPC/HTTP (Outlook Anywhere). Its the same protocol just a different transport but from an Outlook code/client perspective its relatively transparent once the profiles have been created and the connection established. One thing that wouldn't work is trying to do a direct RPC/Mapi connection to Exchange 2016 (or 2013 for that matter).In theory your VBA code should still work if all Mailboxes are hosted in the same org but what you IT department is telling you isn't correct (unless they have specifically disabled MAPI on those mailbox which you could do in previous version of Exchange).

Newly registered user to match with existing in db member [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about programming within the scope defined in the help center.
Closed 8 years ago.
Improve this question
I have a database that contains my company clients info. We want to enable those clients to register on our website and see their data. How should be newly registered user matched with Client entity in our database? Should it be manually done by administrator? If so, what data do we need to identify them? SHould the admin be informed by an email?
It's a matter of privacy.
INSECURE SOLUTION
If you don't mind the possibility of someone seeing your client's info, I would suggest the following:
Provide a form for your clients where they enter their customer ID (if they know it) or simply their full name
Match this info to your database and present a pre-filled form to your clients that they only need to check for changes.
SECURE SOLUTION
Send an email to all of your clients asking them to register using their code (you send them their personal code in this email and you can match this to your database).
Alternatively, you can let your clients enter all of their information and manually match this to the client entity in your db. I cannot suggest this, but if you want to do this, check it on a daily basis.

Cancellation of Outlook AppointmentItems

I have a strange issue regarding the cancellation of an Appointment/Meeting in a C# Add-In. Of course it is possible that I do not handle the events correctly. This is how I do it:
Register Event BeforeDelete on AppointmentItem which may have 0 to n recipients
My goal is to handle the deletion of an AppointmentItem with and without a cancellation message:
No recipients: ask for confirmation before deleting in BeforeDelete. After Outlook has left the BeforeDelete event handler, the item will be deleted from the calendar. I use Cancel = true to prevent a deletion, if the user declines the confirmation.
1 to N recipients: Outlook will enter the BeforeDeletion as usual. The main difference is now that there won't be a deletion but the Inspector opens ready for you to send the cancellation message to the recipients. In this case I want to ask the user for confirmation after he clicks on "Send Cancellation".
Problem: How do I differentiate between meetings with no recipients which get deleted directly and those who need a cancellation message to be sent?
Here the strange issue: When I create an AppointmentItem with 1 recipient, I already have different behaviors on different Outlook installations (both 2010, one with a Gmail account the other one is connected to a company Exchange Server): The Outlook with the Gmail account tells me that AppointmentItem.Recipients.Count is 1, the Outlook with the Exchange Server tells me there are 2 recipients (including myself!). Why is that??