
- #ADD DOCUMENT PROPERTIES WORD 2016 HOW TO#
- #ADD DOCUMENT PROPERTIES WORD 2016 INSTALL#
- #ADD DOCUMENT PROPERTIES WORD 2016 WINDOWS#
#ADD DOCUMENT PROPERTIES WORD 2016 HOW TO#
But I cant figure out how to insert a variable and change it the value of the variable.

The first choice adds a document properties panel to your document screen (which does not print). You can see these in Word 2007-2010 under File (Office Button) > Properties > Advanced. I was thinking of using IF fields in the document. Microsoft Word has a number of built-in document properties and also allows custom document properties.

Similar to an ifdef statement in C header files. The value of this variable will then decide whether or not I include certain text. ' It has to be "refreshed", so after any programmed "Save" of a Worksheet, use I want to place a variable in a Word 2016 document and set it it.
#ADD DOCUMENT PROPERTIES WORD 2016 INSTALL#
To install the above UDF in your workbook go to the VBE (keyboard Alt-TMV), insert a new macro module (Alt-IM), and paste the code into the Code Pane. This would make available some information not available in the built-in document properties. It would also be possible to access the workbook's file information via a UDF which accesses the file attributes in your file system via filesystem access function. Which allows you to access all the built-in document properties by name. GetDocProp = ActiveWorkbook.BuiltinDocumentProperties(DocProp)

Here is a simple UDF you can use:įunction GetDocProp(DocProp As String) As String
#ADD DOCUMENT PROPERTIES WORD 2016 WINDOWS#
There may be a windows API, but this is more complicated than using a VBA user-defined function (UDF). The INFO worksheet function provides some useful system and Excel information, but nothing related to the workbook file properties.

I don't know of any built-in worksheet function that will do this.
