lparameters toFoxCode local lcReturn, ; lcTable if toFoxCode.Location <> 0 toFoxCode.ValueType = 'V' lcReturn = GetText() endif toFoxCode.Location <> 0 return lcReturn function GetText local loRegistry, ; lcKey, ; lcCompany, ; lnResult, ; lcContact, ; lcAccount, ; lcEmail, ; lcText loRegistry = newobject('Registry', home() + 'FFC\Registry.vcx') lcKey = iif('NT' $ os() or '5.0' $ os(), ; 'Software\Microsoft\Windows NT\CurrentVersion', ; 'Software\Microsoft\Windows\CurrentVersion') lnResult = loRegistry.GetRegKey('RegisteredOrganization', @lcCompany, ; lcKey, -2147483646) if lnResult <> 0 lcCompany = '' endif lnResult <> 0 lnResult = loRegistry.GetRegKey('RegisteredOwner', @lcContact, lcKey, ; -2147483646) if lnResult <> 0 lcContact = '' endif lnResult <> 0 * change lcContact to me in case registry says different on this machine lcContact = "{developer name here}" lcKey = 'Software\Microsoft\Internet Account Manager' lnResult = loRegistry.GetRegKey('Default Mail Account', @lcAccount, lcKey, ; -2147483647) if not empty(lcAccount) lcKey = lcKey + '\Accounts\' + lcAccount lnResult = loRegistry.GetRegKey('SMTP Email Address', @lcEmail, lcKey, ; -2147483647) endif not empty(lcAccount) if lnResult <> 0 or empty(lcEmail) lcEmail = '' else lcEmail = ', mailto:' + lcEmail endif lnResult <> 0 ... text to lcText textmerge noshow *============================================================================== * Program: <<wontop()>> * Purpose: ~ * Author: <<lcContact>><<lcEmail>> * Copyright: (c) <<year(date())>> <<lcCompany>> * Last revision: <<date()>> * Parameters: * Returns: * Environment in: * Environment out: *============================================================================== endtext return lcTextMore info also on the Fox Wiki: http://fox.wikis.com/wc.dll?Wiki~IntelliSenseCustomScripts~VFP