Microsoft word data link properties




















This thread is locked. You can follow the question or vote as helpful, but you cannot reply to this thread. I have the same question Report abuse. Details required :.

Cancel Submit. In reply to A. User's post on January 6, A DocProperty field in the document may not always show the date as it appears in the value you specify. You may instead use the type Text. This way, you can enter the date value precisely as you want it to appear in the DocProperty fields in the document.

You must specify a number, either an integer or a decimal number. The decimal symbol to use depends on the regional settings on your PC. If the decimal symbol is a period you can, e. A DocProperty field in the document will show the specified value. You may enter a number value with a thousands separator but Word ignores the separator in the field result.

When you insert DocProperty fields, the value in the document will only be 'Y' for yes and 'N' for no. These code samples may help you create useful macros. In order to create solid VBA code, you will need to add error handling to handle the types of errors that might occur.

The code samples below do not include such error handling. Below are examples of VBA code to edit each of the standard document properties found on the Summary tab of the Properties dialog box. By using names from the wdBuiltInProperty enumeration , you are sure to use correct names that will work in any language version of Word. Each property also has a number that can be used but your VBA code is much easier to understand if you use the names. Note the comments after each of the listed properties — some are not supported in Word even if they are in the list.

Examples of VBA code for editing the values of the standard properties in the active document found on the Summary tab of the Properties dialog box:.

If you are editing two or more values, you should use With and End With as shown below:. The VBA code below adds a custom document property in the active document, with the name "My property", link to content turned off, type "Text" and value "My property value":. For more details about the data types, see About the different data types of custom document properties. The VBA code below changes the value of a custom document property named "My property" to "My new property value":.

The VBA code also works if you leave out ". Value" since. Value is the default property. However, I recommend always adding the property. It makes the code easy to read and you don't run into problems. The example below has left out the default property.

Value not recommended even if it works :. The new value you assign must match the type of custom document property. For example, you can only assign the value in the example above if the type of custom document property is Text.

If you assign a value that does not match the type, a run-time error occurs, saying "Type mismatch". The VBA code below inserts a DocProperty field at the selection, referring to a custom document property named "My property". If no document property with the specified name exists, the field will show an error. The double quotation marks around "My property" are needed to have quotation marks added in the field code.

There are other ways of adding the quotation marks, e. In the general help on Word, you can find information about the different types of switches that can be used with specific fields. The fastest way to find this information is often to search using your preferred browser. In documents with fields, it is important to be able to distinguish fields from normal text so you don't accidentally change a field result by manually modifying its result.

If you manually modify a field result, the change will disappear the next time the field is updated unless the field has been locked. With field shading on, all fields are shown with gray shading on the screen. The gray shading is only visible on the screen in Word — it does not print and it is not visible in PDF.

For information about keyboard shortcuts related to fields, see my article Word Fields — Useful Keyboard Shortcuts. Did you know that DocTools AddBoilerplate. Generate complete documents in seconds from re-usable text or graphics.

DocTools CommentManager. Manage comments in Word fast and easy — auto-number, review, extract comments, etc. DocTools CrossReferenceManager.

Simplify and speed up the management of cross-references even in your most complex documents. DocTools DocPropertyManager. Manage and repeat data in Word fast and easy with custom document properties and DocProperty fields. DocTools ExtractChanges Pro. Extract insertions, deletions and comments from any Word document, incl. DocTools HighlightManager. Apply any highlight color or remove highlight in Word with a single click — customizable shortcuts.

DocTools ObjectBrowser. Browse pages, sections, headings, tables, graphics, etc. DocTools ScreenTipManager. Create screen tips in Word fast and easy — with up to characters. Once you understand how custom document properties and DocProperty fields in Word work, you will be able to create Word documents more efficiently. If you use custom document properties and DocProperty fields for metadata and repeated data, if is easier for you to keep the document data updated and correct.

This article has explained how to add document properties in Word, how to edit document properties in Word, how to insert document properties using DocProperty fields, etc. I hope this article helps you in your future work with custom document properties and DocProperty fields in Word.

How properties and DocProperty fields work. T able of contents. What is a document property in Word? What can document properties be used for? Fact list. Document properties in a template are inherited by new documents based on the template. How to edit the values of standard document properties.

Where is document properties in Word? How to open the Properties dialog box in Word. How to add or edit custom document properties. How to add document properties in Word. Select a server name from the drop-down list, or type the location of the server where the database you want to access is located. Selecting the database on the server is a separate action. Update the list by clicking "Refresh". You can select the following authentication options from this drop-down list: Windows Authentication: Authentication to SQL Server using the currently logged-in user's Windows account credentials.

User name should be set to the application client ID. Password should be set to the application client secret. When checked, allows the password to be saved with the connection string. Whether the password is included in the connection string depends on the functionality of the calling application.

Any more feedback? The more you tell us the more we can help. Can you help us improve? Resolved my issue. Clear instructions. Easy to follow. No jargon. Pictures helped.

Didn't match my screen. Incorrect instructions. Too technical. Not enough information. Not enough pictures. Any additional feedback? Submit feedback. Thank you for your feedback! When all fields are set up as you want, choose Create to make a new list.



0コメント

  • 1000 / 1000