Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

Finding of the 'sendername' is the host computer

Posted on 2008-06-12
1
177 Views
Last Modified: 2010-04-08
Hi again

I wish to execute an if statement, so that when the sendername is the email address of the host computer (ie it was a 'sent' not just a 'recieved' email) then the email is saved in an emails out subfolder, else it is saved in an email in folder.
This macro will need to run on a number of different computers, so I wish to find out how to identify what the host name is

thank you.
0
Comment
Question by:kafrin_1
1 Comment
 
LVL 76

Accepted Solution

by:
David Lee earned 500 total points
ID: 21801320
Hi, kafrin_1.

Is this what you're looking for?
'Assumes that olkItem is any item type
If olkItem.SenderName = Application.Session.CurrentUser Then
    'Code for messages sent by this user
Else
    'Code for received messages
End If

Open in new window

0

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

What does UTC stand for?  “Coordinated Universal Time” – Think of this as the true time on Planet Earth that never changes with the exception of minor leap seconds here and there to account for the changes in the planet's rotation.   What does th…
Read this checklist to learn more about the 15 things you should never include in an email signature.
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
CodeTwo Sync for iCloud (http://www.codetwo.com/sync-for-icloud?sts=6554) automatically synchronizes your Outlook 2016, 2013, 2010 or 2007 folders with iCloud folders available via iCloud Control Panel. This lets you automatically sync them with…

856 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question