Outlook 2003 Computer Name

  • Thread starter Thread starter Daniel
  • Start date Start date
You can get the computer name using an environment variable:

Set wshShell = CreateObject( "WScript.Shell" )
strComputerName = wshShell.ExpandEnvironmentStrings( "%COMPUTERNAME%" )
 
Thanks, that worked. But Now I hit another snag, when I email this form the computer name text box shows empty but it was there when I sent the form. This the script in my form for the text box.


Function Item_Open()
set TextComputerName = Item.GetInspector.ModifiedFormPages.Item("Message").Controls( "TextComputerName")

Set wshShell = CreateObject( "WScript.Shell" )
strComputerName = wshShell.ExpandEnvironmentStrings( "%COMPUTERNAME%" )
TextComputerName.value = strComputerName
End Function








suemvp wrote on Fri, 11 December 2009 17:1
 
Thanks a lot for the help its been very helpful. Now here's my new problem. I change my form into a post so that it be easier to access from any computer in the network without having to go and change anything. Any way it seems that the Computer Name isn't retaining the original poster's info instead it has the computer name of who ever open the post. Is there way to retain the original poster's info?.
Submitted using http://www.outlookforums.com
 
If you're using code in the Item_Open event, you need to test whether the
item is new and store the info only for new items.
 
Back
Top