![]() |
Set initial value From field to %USERNAME%?
Hi,
I want to set the inital value of a From field to ". Is this possible? I made an email template in Outlook which shows the from field. Then I can set the initial value to , but I want Outlook to check the username logged in and put that in front of the @. Hope my explanation is clear and somebody can help me. Kind regards, Lars |
Set initial value From field to %USERNAME%?
To do that in a custom form would require custom code, which wouldn't run in an .oft template and wouldn't be an appropriate solution for messages being sent to external recipients.
Maybe you could provide a more detailed description of your scenario and goals. -- 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 "LarsRotterdam" wrote in message ... Hi, I want to set the inital value of a From field to ". Is this possible? I made an email template in Outlook which shows the from field. Then I can set the initial value to , but I want Outlook to check the username logged in and put that in front of the @. Hope my explanation is clear and somebody can help me. Kind regards, Lars |
Set initial value From field to %USERNAME%?
I hope this to solve the problem.
Put this code inside yout vbscript behind yout form ' Get the username from the Environmet using windows script shell UserName = "Unknown" Set WSH_Shell = CreateObject("WScript.Shell") : HandleERR("CreateObj 'WScript.Shell'") Set WSH_Env = WSH_Shell.Environment("Process") : HandleERR("WSH_Shell.Environment") UserName = WSH_Env("USERNAME") Set WSH_Env = Nothing Set WSH_Shell = Nothing "LarsRotterdam" wrote: Ok, first of all thank you for your quick reply and help. Let me explain the situation. We have different companies with all there own domain name. We have a Small Business Server 2003 which handles all our email. So I have and as an emailaddress. We used Ivasoft software to be able to send from those different emailadresses. You get a From:-field where you have to type to send from this address. I also made a stationairy for each company. In an Outlook template I combined the stationairy with that companies emailaddress in the From-field. This is done so its easy for people that work here and they won't make a misstake. Clients may not know CompanyA belongs to CompanyB and vice versa. But I want to automate the From-field initial value, because else I have to make a template for each individual that works here. The emailaddresses are like . I hope you understand what I'm trying to achieve and you have a solution. Kind regards, Lars "Sue Mosher [MVP-Outlook]" wrote: To do that in a custom form would require custom code, which wouldn't run in an .oft template and wouldn't be an appropriate solution for messages being sent to external recipients. Maybe you could provide a more detailed description of your scenario and goals. -- 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 "LarsRotterdam" wrote in message ... Hi, I want to set the inital value of a From field to ". Is this possible? I made an email template in Outlook which shows the from field. Then I can set the initial value to , but I want Outlook to check the username logged in and put that in front of the @. Hope my explanation is clear and somebody can help me. Kind regards, Lars |
Set initial value From field to %USERNAME%?
Outlook doesn't provide any direct waty to do that. You might ask the Ivasoft folks if they can help out.
-- 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 "LarsRotterdam" wrote in message ... Ok, first of all thank you for your quick reply and help. Let me explain the situation. We have different companies with all there own domain name. We have a Small Business Server 2003 which handles all our email. So I have and as an emailaddress. We used Ivasoft software to be able to send from those different emailadresses. You get a From:-field where you have to type to send from this address. I also made a stationairy for each company. In an Outlook template I combined the stationairy with that companies emailaddress in the From-field. This is done so its easy for people that work here and they won't make a misstake. Clients may not know CompanyA belongs to CompanyB and vice versa. But I want to automate the From-field initial value, because else I have to make a template for each individual that works here. The emailaddresses are like . I hope you understand what I'm trying to achieve and you have a solution. Kind regards, Lars "Sue Mosher [MVP-Outlook]" wrote: To do that in a custom form would require custom code, which wouldn't run in an .oft template and wouldn't be an appropriate solution for messages being sent to external recipients. Maybe you could provide a more detailed description of your scenario and goals. -- 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 "LarsRotterdam" wrote in message ... Hi, I want to set the inital value of a From field to ". Is this possible? I made an email template in Outlook which shows the from field. Then I can set the initial value to , but I want Outlook to check the username logged in and put that in front of the @. Hope my explanation is clear and somebody can help me. Kind regards, Lars |
All times are GMT +1. The time now is 02:30 AM. |
Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 2.4.0
Copyright ©2004-2006 OutlookBanter.com