Outlook 2003 Computer Name

S

Sue Mosher [MVP]

You can get the computer name using an environment variable:

Set wshShell = CreateObject( "WScript.Shell" )
strComputerName = wshShell.ExpandEnvironmentStrings( "%COMPUTERNAME%" )
 
D

Daniel

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
 
D

Daniel

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
 
S

Sue Mosher [MVP]

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top