vba

  1. R

    How to get the Items object of the default mailbox of a specific account in a multiple account Outlook?

    My Outlook has multiple accounts. How do I get the Items object of a specific account? For example, assume that there are three account, username@abc.com, username@def.com and username@ghi.com. Further, assume that Items object that corresponds to the Inbox for username@ghi.com is needed. What...
  2. C

    CreateItemFromTemplate throws OutOfMemoryException

    Hi, we are publishing Outlook forms (*.oft files) using the following code: olMailItem = _olApp.CreateItemFromTemplate(pathToOftFile, _missing) as MailItem; olFormDescription = olMailItem.FormDescription; olFormDescription.DisplayName = "MyDisplayName"...
  3. O

    Forward a email with modified body Automatically.

    Hello, First time poster here, i took some time to read what the forum has to offer but i still have some questions Description of the issue: What i am trying to achieve is that when ever i receive a email with the Subject "XXXX" from the sender "XXXX" it will look in the body for a specific...
  4. O

    Email not leaving Outbox when using Excel VBA to sync Outlook account

    Hi everybody, I've just joined this forum - thanks for having me and I need some of your expertise, if you don't mind... My situation: I have a single outlook.com exchange account added to Outlook 2019. By default, when I go into Send/Receive Groups, All Accounts, Edit..., the tickbox for...
  5. M

    How to export Voting Results with user names and their responses

    Hello, I came across an article named "How to Quickly Export Voting Statistics from an Outlook Email to an Excel Worksheet" and it's almost what I'm looking for. I'd like the macro to actually list the user names and/or email addresses and their responses. I realize I can do this manually but...
  6. C

    Copy Outlook contact field value to another field

    I didn't see an option for Office 365 Pro Plus in your list of Outlook version, so chose Outlook 2016 32 bit for lack of knowledge on which would be closest fit. I erroneously placed data in the Computer Network Name which won't export with the CodeTwo Outlook Export tool or the native...
  7. B

    VBA to Collapse Task Folder Groups

    I am familiar with VBA, but most of my VBA experience is with Access. I would like to write VBA Code to collapse or expand all Task folder groups. This works with the tasks themselves using the native option under View - Expand/Collapse; however, it does not expand or collapse the sidebar groups...
  8. Y

    Open and Save Hyperlink Files in multiple emails

    Hi, I'm very new to this VBA but have read Open All Hyperlinks in an Outlook Email Message posting. However, I'm looking for a way to open a very specific Hyperlink within an email usually following the word "Attachments" the name of the Hyberlinks differ each time. Or perhaps another way to go...
  9. W

    error with the permission for the file

    With Outlook 2016 in VBA I try to save an email as a file. I get the error message: Outlook could not complete the saving due to an error with the permission for the file …… .. I tried to change the permission for the folder where I want to save the file. Anyone can write in this folder. But...
  10. A

    Edit subject - and change conversationTopic - using VBA and redemption

    Hi all: My organization has started prepending "[EXTERNAL EMAIL]" to subject lines. Some of the people I correspond with are frustrated by this, especially when replies end up with multiple copies of that string. My goal is to remove that text (at least for certain people). Using (very...
  11. A

    VBA Code in Outlook disappears after first use

    Hi, I have a simple VBA code in Outlook 2016 that pops up when users send an email that does not contain our domain name. This works fine on a local machine using a local profile but when I transfer the code to accounts in a Citrix environment the code works only once and then disappears and...
  12. Alex Cotton

    "invalid or unqualified reference" on code that should work

    Hello, I am reasonably experienced in using VBA for Excel, but new in Outlook. I copied some basic inbox new mail trigger code that should work. However, I get an "invalid or unqualified reference" refering to "item". Can someone please give me a pointer as to where to look. I have googled for a...
  13. A

    Outlook macro to create search folder with mail categories as criteria

    Hi there, Since 2010, my workflow is based on the principle of Control Your Day. Main tools are categories and search folders. I have improved the process by adding my own VBAs to add next actions to the context folder. The last missing piece I can not get working is the ability to create a...
  14. V

    extract users of a particular department

    HI, In my outlook there are 15k of email address (users) are there. and those users are pertaining to different departments. I'm trying to retrieve users those who are belongs to a particular department say "Civil Engineering" to a listbox using vba. Thanks, Vinoth
  15. B

    Looking to get the Recipient email address (or even the "friendly name") from an email I am replying to using VBA

    I am needing to get the email address that someone sent an email TO. I have come up with one method that seems to use a link but that link is no longer valid: Const PR_SMTP_ADDRESS As String ="https://schemas.microsoft.com/mapi/proptag/0x39FE001E" But I cannot find another way. My immediate...
  16. D

    [TOOL] QuickModules to sort emails very quickly to multiple folders

    Hello all ;) , I did not find a way to include it in resources so I'm posting it here. This is a project (VBA Outlook) that I've made that really helped me sorting my emails with Outlook when I was managing projects and had many emails coming on various topic I had to follow. Email rules...
  17. 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...
  18. 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...
  19. 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...
  20. 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...
Top