J
Jazsnap
I've written some very basic VBA code within Outlook in order to warn users
who send emails above the company's maximum allowed file size. The code
brings up a message box informing them that the email is in excess of the
company's email policy & gives them the opportunity to cancel; if they
choose to send the email regardless, the time, file size & username are
written to an internal database.
I would like to modify the script for our laptop users so that I can
somehow ascertain whether the user is logged on to our internal network
(Windows 200 domain) or not. This will enable me to only check emails that
are sent through our internal network & allow them to send whatever they
want from home or wherever. What would be the best check to perform for
this purpose? I have tried the below but even if users logon to their
laptops disconnected from our network "WshNetwork.UserDomain" still matches
our windows domain.
Set WshNetwork = CreateObject("WScript.Network")
If WshNetwork.UserDomain <> "<our windows domain>" Then Exit Sub
Any help would be appreciated, Jason
who send emails above the company's maximum allowed file size. The code
brings up a message box informing them that the email is in excess of the
company's email policy & gives them the opportunity to cancel; if they
choose to send the email regardless, the time, file size & username are
written to an internal database.
I would like to modify the script for our laptop users so that I can
somehow ascertain whether the user is logged on to our internal network
(Windows 200 domain) or not. This will enable me to only check emails that
are sent through our internal network & allow them to send whatever they
want from home or wherever. What would be the best check to perform for
this purpose? I have tried the below but even if users logon to their
laptops disconnected from our network "WshNetwork.UserDomain" still matches
our windows domain.
Set WshNetwork = CreateObject("WScript.Network")
If WshNetwork.UserDomain <> "<our windows domain>" Then Exit Sub
Any help would be appreciated, Jason