• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

vba

  1. M

    Macro to add date/time stamp to subject

    Hi all, A complete Outlook macro newbie here (and a macro newbie in general). I have been trying to get a macro to work to add a date/time stamp to the subject of all emails in the selected outlook folder. I am receiving an error on my 'check' line to avoid duplication of the date/time stamp on...
  2. D

    Autosave Attachment and Rename

    I have the following code that autosaves the attachments from any incoming mail and renames the attachment with the date and time so as not to overwrite. Public Sub AutoSaveAttachment(itm As Outlook.MailItem) Dim objAtt As Outlook.Attachment Dim saveFolder As String Dim dateFormat...
  3. D

    Moving Emails Based on Recipient/Sender

    Greetings, I have what seems like should be an easy challenge but the simplistic "Outlook Rules" are not getting me all the way to my solution. I was hoping folks here could maybe help. I need to separate emails that are both from and to internal company people from emails that include...
  4. D

    Move Emails between Folders in Separate Mailbox

    Greetings, I am trying to move all messages in one subfolder to another. Actually I have to do that twice but I can adapt the code myself. My trouble is that I'm far more adept with Access VBA than Outlook VBA. Also, the message folders (current and target) aren't within my own mailbox...
  5. K

    Outlook 2016 Update Appointment category when changed in Excel

    I have a task tracking list in an Excel table. I have a macro (attached to a userform CommandButton) that, after I fill out the form, it adds the data to the last row of the table and then creates meeting invites based on the due date and time on each row. To avoid duplication of appointments...
  6. D

    Edit Subject (Multiple Accounts)

    On my work PC I have two outlook accounts, my account and a shared account. All external emails that we receive have an annoying note added to the subject line which is basically a warning that it's an external email. I used to have a script set up with a rule but for some reason the 'run a...
  7. A

    Capturing Send Variables without using Application_ItemSend in ThisOutlookSession

    Hello, I want to place a custom button in the send window's ribbon which allows me to capture the sender, recipient, subject, body and date/time sent and pass these through to an Access database then send the email as normal. I have found out how to get these variables using the...
  8. J

    Outlook 2010 Open an outlook email by Subject on MS Access linked table with VBA

    Hi everyone I linked my Inbox folder to MS access table. It means that every time I open my access table, it is updated as per current emails in my inbox - It is already an built in feature on MS Access. I would like to know on how from my MS Access, using the Subject field in my linked table I...
  9. C

    Outlook 2010 How to replace or delete first instance of sentence in mail body?

    Dear Madam, Sub :- How to replace or delete first instance of sentence in mail body? hello & have a good day.. I already have a Excel Vba macro for send unique mails for each file in one folder with conditional To, Subject & body with rich text format signature that's work fine ..but .. I...
  10. E

    Search for folder by key in subject then move new message to related folder

    I need to move the incoming message to the related folder if there is a loop for that depending on a key in the subject of the message. I developed a script for getting the key in the subject of new message. How can I search rest of messages by a key and retrieve related folder? Sub...
  11. P

    Run Time Error 91 when linking contact to task in VBA

    I have a piece of code that creates a task then links a specified contact to the task. It worked fine in Outlook 2010, however I have recently updated to the most current version of Outlook (Office 365 version 1708) and the Links.Add method is now throwing the run time error 91 with the "object...
  12. T

    Outlook AntiSpam with VBA

    So we know Outlook has this internal filtering system that sends junk mail to Junk folder even when filtering option is turned off. I'm wondering if there's a way to look at or "hack" it. Using VBA or something? I want to keep some emails from being labeled as Phishing or junk by the internal...
  13. V

    VB script code to save a specific email attachment from a given email

    Hi, I'm new to VBA and also this forum. I'm using a simple script code to save email attachments to a Drive folder and name them when they arrive, and activating it within an Outlook rule(run a script), its working fine.......when there is only one attachment in the email. Is there a script...
  14. K

    Outlook 2010 Update subject based on text in body

    I would love to be able to automate a time consuming, tedious process that a couple of us are faced with in the office. We receive around 130 emails 6x a year with no way to easily identify the school the email is about. There is a string within the body that looks like this - S987654.X# (the X...
  15. Wayne Dardis

    Calling Ribbon Button in Outlook 2016

    I am not a VBA programmer. The following is the main sub of a project that I cobbled together for Outlook 2007 and was pleased to find it worked for Outlook 2010 a few years later. However, we are moving to Outlook 2016 now and I've found that it does not work as intended. We have displays...
  16. J

    Outlook 2010 Automatic color category according to variable domains

    Hi All, Sorry in advance if this question has been asked already, I just can't seem to find anything online that I can understand. My experience with VBA is limited to its applications with excel. Everyday, I receive hundreds of emails from variable external persons. I would like to assigned...
  17. A

    Sort emails into subfolders based on sender and deleting emails automatically

    Hi All, Sorry in advance if this question has been asked already, I just can't seem to find anything online that I can understand. My experience with VBA is limited to its applications with excel. At the moment, every time I save my spreadsheet at work, it will automatically send that saved...
  18. J

    VBA to switch Outlook online/offline

    Most of my tasks are done via Outlook ie most of the work I do is composing and responding to emails. I can switch Outlook offline /online manually, but I was wondering if there was a Macro that would automate this. My schedule is as follows 7am Online 8:45 Offline 10:45 Online 10:50 Offline...
  19. C

    VBA to Forward e-mails from certain address and between certain times

    Hi, I am looking for a VBA code to forward emails from a common mialbox to another address based off of two constraints: 1. if the email came from a certain address 2. if the email came between certain times Thanks for your help :) Coffee
  20. I

    Dialog called up multiple times when saving emails from macro

    This macro saves selected emails into a folder chosen by function "BrowseForFolder". If I select "n" emails to save, the dialog comes up "n" times. Is there a way to call it up just once? Option Explicit Public Sub Save_Messages_Select_Ask2() Dim oMail As Outlook.MailItem Dim objItem As...