vba - Storing a hidden, non-editable variable in a form. Word 97 Compatible -


I need a non-editable field in a word form which can be read in vba.

Currently, I use a text field as hidden:

  ActiveDocument.FormFields ("DocID"). Select the selection. Fonts Hidden = false // Read it again to hide it.  

However users can still 'tab' this text field and overwrite that document ID and thus invalidate vba macro. And unfortunately it happens what happens.

I can set the text field property 'Fill in-enable' to the wrong which gives the desired effect in the form, so the user can not edit it. However now this text field can not be read in vba.

  ActiveDocument.FormFields ("DocID"). SomeProperty // error 'Error has been requested member is not present'  

So my question is, Is there a way that I can hide the hidden variables in a word form Can I archive in a VBA macro?

Unfortunately this should be a Word-97 compatible solution. You can use custom document properties instead, see here:


Comments

Popular posts from this blog

java - NullPointerException for a 2d Array -

python - Assemble mpeg file unable to play in mediaplayer -

c# - NameSpace Manager or XsltContent to parse aspx page -