Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6647683
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T00:33:59+00:00 2026-05-26T00:33:59+00:00

Is it possible to detect which account an email is being sent via the

  • 0

Is it possible to detect which account an email is being sent via the Application_ItemSend VBA function of Outlook 2003? The accounts are POP3/SMTP on a standalone machine, and not MAPI or Exchange based.

I have tried using “Outlook Redemption” (http://www.dimastr.com/redemption/) but I just cannot find any property / method that will tell me which of the accounts the email is being sent through.

I don’t need to be able to amend/select the account being sent from, just simply detect.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T00:33:59+00:00Added an answer on May 26, 2026 at 12:33 am

    I have found a way of finding the account name, thanks to this link which provides the code for selecting a particular account.

    Using this code as a base, I have create a simple GetAccountName function, which is doing exactly what I need it to do.

    Edit: The below will only work if you’re NOT using Word as the editor.

    Private Function GetAccountName(ByVal Item As Outlook.MailItem) As String
        Dim OLI As Outlook.Inspector
        Const ID_ACCOUNTS = 31224
    
        Dim CBP As Office.CommandBarPopup
    
        Set OLI = Item.GetInspector
        If Not OLI Is Nothing Then
            Set CBP = OLI.CommandBars.FindControl(, ID_ACCOUNTS)
            If Not CBP Is Nothing Then
                If CBP.Controls.Count > 0 Then
                    GetAccountName = CBP.Controls(1).Caption
                    GoTo Exit_Function
                End If
            End If
        End If
        GetAccountName = ""
    
    Exit_Function:
        Set CBP = Nothing
        Set OLI = Nothing
    End Function
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Is it possible to detect which CCScene is currently showing on the scene? I
Is it possible to detect which Photoshop version a brush set (.abr) file is
Is it possible to detect which proxy is active which is dead? using c#
Possible Duplicate: How can we programmatically detect which iOS version is device running on?
I want to know if it's possible to detect available colors in terminal which
Possible Duplicate: How to detect which row [ tr ] is clicked? I have
Is it possible to detect the language which is used by the mobile phone
Possible Duplicate: How do I detect which kind of JRE is installed — 32bit
Is it possible to detect duplicate functions in Javascript (which may be written by
Possible Duplicate: Detect multitouch with Ontouch listener Android I have a question about detecting

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.