#1   Report Post  
Posted to microsoft.public.word.docmanagement
Sharpe
 
Posts: n/a
Default 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   Report Post  
Posted to microsoft.public.word.docmanagement
Jezebel
 
Posts: n/a
Default 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

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
format field for social security number carolina girl Microsoft Word Help 4 February 15th 06 07:32 PM
Userform in word SuzieQ Microsoft Word Help 2 December 12th 05 09:42 PM
request form using a userform? Justin New Users 1 December 8th 05 07:49 PM
Userform - .Range_ Michelle Microsoft Word Help 1 December 8th 05 02:45 AM
creating a userform Jill D Microsoft Word Help 8 November 15th 05 07:25 PM


All times are GMT +1. The time now is 06:31 PM.

Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 Microsoft Office Word Forum - WordBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Word"