How to insert specific fields on Word 2003 and 2007?


   hello, want insert 3 fields on new documents users produce in word , excel 2003 , 2007. these fields:

   1- on field name of employee creating document. take name of user logged session?

   2- second field category of document (confidential, restricted, free, etc). can dropdown menu.

   3- field contains "distribution list" document. want build list offering field user can access gal contacts word (outlook must opened), pick-up users , @ end listed in front of "distribution list" label.

   main questions:

   a) how solve 3 questions above? there better not 1 listed above?

   b) how guarantee "new kind of controlled documents" being used users? changing "templates" docs exists in word , excel? need reinstall office or can change other way?

   best regards, eduardo.

 

 

i think need userform.  see following pages of greg maxey's website :

http://gregmaxey.mvps.org/create_and_employ_a_userform.htm

http://gregmaxey.mvps.org/populate_userform_listbox.htm
 see article "how username of current user” at:
http://www.word.mvps.org/faqs/macrosvba/getcurusername.htm

to populate listbox or combobox on userform data outlook use:

here's example fills listbox on userform. you'll need a
reference in visual basic editor outlook library in order run
this:
----------------------------------- dim integer
dim ooutlookapp outlook.application
dim ooutlooknamespace outlook.namespace
dim ocontacts outlook.mapifolder
dim ocontact outlook.contactitem
 on error resume next
 set ooutlookapp = getobject(, "outlook.application")
 if err <> 0 then
   set ooutlookapp = createobject("outlook.application")
 end if
 set ooutlooknamespace = ooutlookapp.getnamespace("mapi")
 'get contactfolder
 set ocontacts = ooutlooknamespace.getdefaultfolder(olfoldercontacts)
 for each ocontact in ocontacts.items
   me.listbox1.additem ocontact.lastnameandfirstname
   = + 1
 next
 set ocontact = nothing
 set ocontacts = nothing
 set ooutlooknamespace = nothing
 set ooutlookapp = nothing
-----------------------------------  -- hope helps.

doug robbins - word mvp,
dkr[atsymbol]mvps[dot]org
posted via community bridge

"eeoc" wrote in message news:56ccdac9-efa3-4727-bba4-96bd08e49f26@communitybridge.codeplex.com...

   hello, want insert 3 fields on new documents users produce in word , excel 2003 , 2007. these fields:

   1- on field name of employee creating document. take name of user logged session?

   2- second field category of document (confidential, restricted, free, etc). can dropdown menu.

   3- field contains "distribution list" document. want build list offering field user can access gal contacts word (outlook must opened), pick-up users , @ end listed in front of "distribution list" label.

   main questions:

   a) how solve 3 questions above? there better not 1 listed above?

   b) how guarantee "new kind of controlled documents" being used users? changing "templates" docs exists in word , excel? need reinstall office or can change other way?

   best regards, eduardo.




doug robbins - word mvp dkr[atsymbol]mvps[dot]org


Microsoft Office  >  Word IT Pro Discussions



Comments

Popular posts from this blog

CRL Revocation always failed

Failed to query the results of bpa xpath

0x300000d errors in Microsoft Remote Desktop client