PDA

View Full Version : Creating a Validation Toolbar in Word



bagullo
01-27-2011, 12:25 AM
Hello there,

I want to create a toolbar in word that in turn opens a userform to validate a document.
The problem is that there is a validation chain so I need to store this information somewhere (hardcoding the usernames in the code is not an option I would say)

the idea is that when the user opens the userform and clicks ok this is stored and email is sent to the next in the validation chain (if some user selects NG than it goes down again)

I already accomplished that in excel, where I store the validation information in a hidden worksheet

is there some possible workaround in Word? :banghead:

do I have to programaticaly create code?? :dunno

all help welcome

macropod
01-27-2011, 02:16 AM
Hi bagullo,

In both Word and Excel, you can define custom document properties for storing and retrieving the validation data.

See: http://word.mvps.org/faqs/macrosvba/MixedDocProps.htm
and: http://www.cpearson.com/excel/docprop.aspx

bagullo
01-27-2011, 06:04 AM
Hi bagullo,

In both Word and Excel, you can define custom document properties for storing and retrieving the validation data.



Thank you Macropod -- never explored those, probably now is a good time :thumb

gmaxey
01-27-2011, 09:43 AM
For defining custom document properties or setting values in built-in properites you may find the following useful:

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

Paul_Hossler
01-27-2011, 03:26 PM
I'd use document variables.

Properties, Content Controls, Bookmarks are more accessible to the user

Word Help:



Word Developer ReferenceVariable ObjectRepresents a variable stored as part of a document. Document variables are used to preserve macro settings in between macro sessions. The Variable object is a member of the Variables (http://vbaexpress.com/forum/ms-help://MS.WINWORD.DEV.12.1033/WINWORD.DEV/content/HV10058649.htm) collection. The Variables collection includes all the document variables in a document or template.

Remarks
Use Variables(Index), where Index is the document variable name or the index number, to return a single Variable object. The following example displays the value of the Temp document variable in the active document.


Paul

fumei
01-28-2011, 10:18 AM
For what it is worth, I would vote for using Variables as well.