warrenbounds
MIS
Ok
So noob here with vbs, so hang in there
Im trying to take a variable (like the logged on user) and put this infront of our domain name to create an email address to populate "objMail.To"
so this part of the codes works, and dispalays the username :
Dim objNetwork
Dim userName
Set objNetwork = CreateObject("WScript.Network")
userName = objNetwork.UserName
WScript.Echo userName
But I bin the last line as i dont need it to be displayed, I want to use this to create an email address now.
so I have my next bit of code working if i put my email address after the "objMail.To" command like this
objMail.To = myname@mydomain.co.uk
I get the email, happy days.
But I want to use the above variable here, so the email is created automatically, and i dont know the syntax to use.
This is what I want, but i dont know how to do it ! (username here being the variable from above)
objMail.To = username@mydomain.co.uk
hope this makes sense
So noob here with vbs, so hang in there
Im trying to take a variable (like the logged on user) and put this infront of our domain name to create an email address to populate "objMail.To"
so this part of the codes works, and dispalays the username :
Dim objNetwork
Dim userName
Set objNetwork = CreateObject("WScript.Network")
userName = objNetwork.UserName
WScript.Echo userName
But I bin the last line as i dont need it to be displayed, I want to use this to create an email address now.
so I have my next bit of code working if i put my email address after the "objMail.To" command like this
objMail.To = myname@mydomain.co.uk
I get the email, happy days.
But I want to use the above variable here, so the email is created automatically, and i dont know the syntax to use.
This is what I want, but i dont know how to do it ! (username here being the variable from above)
objMail.To = username@mydomain.co.uk
hope this makes sense