Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
Userform
Hi
I am creating new templates for faxes, emails etc with pop-up userforms on open. Does anyone know how to get user information to generate on the userform. Im not talking about the user info under word/tools/options/user info. Im after whoever is logged onto the PC etc. Their Username,Title,Company,PhoneNo and email address. When a new doc is opened using the template, the userform opens up with this info already displayed. The user can edit before selecting ok. Then all info off the userform is loaded into the relevant bookmarks in the doc. Any help appreciated Ta |
#2
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
Userform
Username has a couple of meanings. The information on the Tools Options
User Information tab is available through Application.UserName and Application.UserAddress. If you want the Windows login UserName, use the GetUserName API -- Private Declare Function GetUserName Lib "advapi32.dll" Alias "GetUserNameA"(ByVal lpBuffer As String, nSize As Long) As Long The other values you're after -- Title,Company,PhoneNo and email address -- aren't necessarily available anywhere. You'll need to prompt for them the first time, then save them for subsequent use. There are any number of places you could save them -- Registry, Document properties or variables in normal.dot, an INI (or any other kind of) file, etc. "Sharpe" wrote in message ... Hi I am creating new templates for faxes, emails etc with pop-up userforms on open. Does anyone know how to get user information to generate on the userform. Im not talking about the user info under word/tools/options/user info. Im after whoever is logged onto the PC etc. Their Username,Title,Company,PhoneNo and email address. When a new doc is opened using the template, the userform opens up with this info already displayed. The user can edit before selecting ok. Then all info off the userform is loaded into the relevant bookmarks in the doc. Any help appreciated Ta |
Reply |
Thread Tools | |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
format field for social security number | Microsoft Word Help | |||
Userform in word | Microsoft Word Help | |||
request form using a userform? | New Users | |||
Userform - .Range_ | Microsoft Word Help | |||
creating a userform | Microsoft Word Help |