Outlook 2003 Computer Name

Status
Not open for further replies.
D

Daniel

How do I grab the computer name and place it in a textbox in a custom form on outlook 2003?.
 
S

Sue Mosher [MVP]

You can get the computer name using an environment variable:

Set wshShell = CreateObject( "WScript.Shell" )

strComputerName = wshShell.ExpandEnvironmentStrings( "%COMPUTERNAME%" )

Sue Mosher

"Daniel" <donotreply2me[at]yahoo[dot]com> wrote in message

news:uQJ3g5qeKHA.5020@TK2MSFTNGP02.phx.gbl...
> How do I grab the computer name and place it in a textbox in a custom form
> on outlook 2003?.
 
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:11
> You can get the computer name using an environment variable:

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

> > Sue Mosher
> > >

> "Daniel" <donotreply2me[at]yahoo[dot]com> wrote in message
> news:uQJ3g5qeKHA.5020@TK2MSFTNGP02.phx.gbl...
> > How do I grab the computer name and place it in a textbox in a custom form
> > on outlook 2003?.
 
S

Sue Mosher [MVP]

You need to bind a custom property to the text box -- on both the compose

and read pages -- and use code to set the property's value. See

http://www.outlookcode.com/article.aspx?ID=38

Sue Mosher

"Daniel" <donotreply2me[at]yahoo[dot]com> wrote in message

news:%232XXtUOfKHA.2184@TK2MSFTNGP04.phx.gbl...
> 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
 
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?.
 
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.

Sue Mosher

"Daniel" <donotreply2me[at]yahoo[dot]com> wrote in message

news:%23cL8bM0fKHA.5568@TK2MSFTNGP02.phx.gbl...
> 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
> https://forums.slipstick.com
 
Status
Not open for further replies.
Similar threads
Thread starter Title Forum Replies Date
V Outlook 2003 and Windows 11 Using Outlook 4
glnz Moving from Outlook 2003 to MS365 Outlook - need basics Using Outlook 4
I Outlook 2003 shows html code when To: field is empty Using Outlook 7
B Outlook 2003 email sending & receiving suddenly stopped working Using Outlook 3
H Outlook 2003 find by "has attachment" Using Outlook 1
glnz How set up new IMAP on Outlook-Office 365 and merge in pst from Outlook 2003 for same two email accounts? Using Outlook 5
P Import Categories from Outlook 2003 Using Outlook 8
V Outlook 2003 problem with Windows 10 Creators Update 1709 Using Outlook 0
M Outlook 2003 pictures - some visible, some not Using Outlook 0
S Outlook 2003 to Outlook 2013 pst file Using Outlook 5
O Memory Leak in Outlook 2003 Using Outlook 3
W Changing looks of emails in Outlook 2003 Using Outlook 0
O Outlook 2003 can't send, but settings seem OK Using Outlook 1
P URL Hyperlink not working correctly in Outlook 2003 Using Outlook 10
O Outlook 2003 can't open contacts. Using Outlook 2
O Promoting Outlook 2003 User Templates Using Outlook 1
O W-a-a-y too many PSTs (Outlook 2003) Using Outlook 0
J Outlook 2003-2010 PST Field Editor Using Outlook 1
P Outlook 2003 - Do I need a new profile? Using Outlook 2
E Want to Import Outlook 2003 pst files to later version Using Outlook 6
A error message outlook 2003 Using Outlook 1
B Seeking advice now Outlook 2003 is unsupported by Exchange Using Outlook 4
O Change Debit to Credit in Outlook 2003? Using Outlook 1
J problems downloading POP3 emails to Outlook 2003 Using Outlook 1
G Outlook 2003 VBA Won't Run In Outlook 2010 Outlook VBA and Custom Forms 4
P Outlook 2003 - possible to recreate corrupt account? Using Outlook 3
Calvyn Outlook 2003 cannot import .vcs subject Using Outlook 1
T Query about one aspect of migrating .pst files from Outlook 2003 to Outlook 2013 Using Outlook 5
C Outlook 2003 contacts Using Outlook 1
G Configuring Outlook 2003 for Gmail with both pop3 & imap4 accounts Using Outlook 1
M HELP--Extract Data from 2003 outlook transfer to excel spreadsheet Using Outlook 1
V Outlook 2003 editing problem Using Outlook 4
X Outlook 2003 not sending all of the new email message Using Outlook 1
2 How to use outlook 2003 calendar in always offline mode Using Outlook 0
G Outlook 2003 I need to move email to folder based on subject, using wild card Using Outlook 0
G outlook 2013 - Open In Outlook 2003 Using Outlook 1
A Exchange 2003 Outlook 2010 64 Bit- AutoDiscover Connection Err - Certificate Exchange Server Administration 9
T Use Outlook 2003 with Office 2013 Using Outlook 1
D Outlook 2003 contact folder opend in scrolled down position Using Outlook 2
O Need advice ASAP! Outlook 2003. Using Outlook 1
H Custom Contact form not working in Outlook 2003 Using Outlook 3
O Outlook 2003 forms problem Using Outlook 3
O Duplicate folders in Outlook 2003 Using Outlook 3
O Moving OUtlook 2003 from bad XP to Win 7 Pro 64 -- URGENT! Using Outlook 8
A File - Save Attachments does nothing in Outlook 2003 with Exchange 2010 ... Using Outlook 3
R Menus in a new\old email not there in Outlook 2003 Using Outlook 2
R OUTLOOK 2003 on WinXP, Prob: CONTACTS or ADDRESS BOOK not connected or missing Using Outlook 6
R Outlook 2003 not working Using Outlook 13
C Outlook 2003 displays wrong account in IMAP Using Outlook 5
J How to set a flag to follow up using VBA for outlook 2003 Using Outlook 10

Similar threads

Top