Solved

Finding of the 'sendername' is the host computer

Posted on 2008-06-12
1
176 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

Windows Server 2016: All you need to know

Learn about Hyper-V features that increase functionality and usability of Microsoft Windows Server 2016. Also, throughout this eBook, you’ll find some basic PowerShell examples that will help you leverage the scripts in your environments!

Question has a verified solution.

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

Outlook Free & Paid Tools
Finding original email is quite difficult due to their duplicates. From this article, you will come to know why multiple duplicates of same emails appear and how to delete duplicate emails from Outlook securely and instantly while vital emails remai…
To add imagery to an HTML email signature, you have two options available to you. You can either add a logo/image by embedding it directly into the signature or hosting it externally and linking to it. The vast majority of email clients display l…
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit https://www.mail-signatures.com/articles/signature-templates/?sts=6651 If you want to manage em…

770 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