![]() |
If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
![]()
I'm using the following code with my custom form:
Sub cmdSubmit_Click() Dim oWsNetwork Set oWsNetwork = CreateObject("WScript.Network") Dim strUsername Set strUsername = oWsNetwork.UserName Set oWsNetwork = Nothing Item.UserProperties("UsernameHold") = strUsername End Sub The code is failing with the following message: "Object required: '[string:"jsmith"]', and breaks on the line "Set strUsername = oWsNetwork.UserName". Any idea what the problem is? Thanks, Boyd |
#2
|
|||
|
|||
![]()
Never use a Set keyword when assigning a value to a non-object variable.
-- Sue Mosher, Outlook MVP Author of Configuring Microsoft Outlook 2003 http://www.turtleflock.com/olconfig/index.htm and Microsoft Outlook Programming - Jumpstart for Administrators, Power Users, and Developers http://www.outlookcode.com/jumpstart.aspx "Boyd" wrote in message ups.com... I'm using the following code with my custom form: Sub cmdSubmit_Click() Dim oWsNetwork Set oWsNetwork = CreateObject("WScript.Network") Dim strUsername Set strUsername = oWsNetwork.UserName Set oWsNetwork = Nothing Item.UserProperties("UsernameHold") = strUsername End Sub The code is failing with the following message: "Object required: '[string:"jsmith"]', and breaks on the line "Set strUsername = oWsNetwork.UserName". Any idea what the problem is? Thanks, Boyd |
#3
|
|||
|
|||
![]()
Perfect!
Thanks Sue. |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Automate Outlook username and server | Sam Stamp | Outlook - Installation | 2 | December 13th 07 08:02 AM |
Domain name before username | Micke | Outlook - Installation | 1 | July 4th 06 07:08 AM |
Outlook 2003 and %username% | TLMPLHou66 | Outlook - Installation | 0 | May 10th 06 11:26 PM |
OE won't remember username and password | Ron | Outlook Express | 1 | April 29th 06 05:52 AM |
Using CMW - %Username% | Amin from TO | Outlook - Installation | 2 | January 16th 06 07:31 PM |