Results 1 to 6 of 6
  1. #1
    Star Lounger
    Join Date
    Mar 2008
    Posts
    98
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Need excel code to extract outlook 03 display name (Excel 03)

    Does anyone know how I can extract the Microsoft outlook 2003 default display name and pull this into my excel VBA as a string?

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Need excel code to extract outlook 03 display name (Excel 03)

    Welcome to Woody's Lounge!

    Can you tell us what exactly you mean by "the Microsoft outlook 2003 default display name"?

  3. #3
    Star Lounger
    Join Date
    Mar 2008
    Posts
    98
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Need excel code to extract outlook 03 display name (Excel 03)

    Hans,

    Thanks for the welcome.

    In outlook, when you set up your user profile. It ask for a first name (let's use John) and last name (let's use Smith) and then combines these two name to create the display name. The display name would appear as such (Smith, John). The default display name would simply be this name for the default outlook user profile assigned to a Windows XP login.

    Basically what I'm trying to accomplish is to first send and email with and excel attachment to a distribution list. To do this I'm using the has routing slip / route function. If you have a better suggestion to the has routing slip function, I'm all ears. With this function, I'm also including a subject line and message for the body of the email, but every time the email goes out, there is no signature at the bottom of the email. I would like to include either the outlook signature if possible or to use the default display name from outlook just in case the person sending out the email does not have any saved signatures in outlook.

    I basically have every thing in place for my VBA to work, just no signature at the bottom of the email message.

    One other thing that I would prefer not to have to deal with when using the has routing slip function is at the very bottom of the email it says "You are the last recipiant of this message. No further routing is needed" or something like that. Is there any way to avoid this showing up in the email and to still be able to send the active excel sheet as and attachment in the outlook email?

    Any help with this would certainly be appreciated. Thanks for your time!!

  4. #4
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Need excel code to extract outlook 03 display name (Excel 03)

    I think you'll need to automate Outlook for this. You'll find lots of examples on Example Code for sending mail from Excel by Excel MVP Ron de Bruin.

    If you create an Outlook.Application object named olApp, the user name is olApp.Session.CurrentUser.

  5. #5
    Star Lounger
    Join Date
    Mar 2008
    Posts
    98
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Need excel code to extract outlook 03 display name (Excel 03)

    Hans,

    Thanks again for your help. I was able to make it work using the olapp.Session.CurrentUser method you suggested. One last question if you don't mind. Is their a way to not display the outlook alerts I get when using this method and also when I send the email?

    Thanks so much for your time and help. I really appreciate it.

  6. #6
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Need excel code to extract outlook 03 display name (Excel 03)

    There is no option within Outlook to suppress the warning, but there are several workarounds:
    <UL><LI>If you use Outlook with Exchange Server, the Exchange administrator can remove the restriction selectively: see Administrative Options for the Outlook E-mail Security Update.
    <LI>You can install a free utility ClickYes. It sits in the notification area (aka system tray) and clicks Yes for you.
    <LI>You can rewrite your code to use Extended MAPI. Since this can't be scripted, it doesn't need the draconic security measures. You can download a COM add-in that provides a wrapper about Extended MAPI: Outlook Redemption. It is free for development use; if you want to distribute it, you need a license.[/list]ClickYes is probably the easiest solution.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •