#1
|
|||
|
|||
Document Property Question
I've created a form that uses multiple date fields that autopopulate through out. I used the Publish Date in Document Property and its working perfectly. I need another date field like it, but I dont see anymore in the Document Property section. I just need a date field that will autopopulate in other areas. Any suggestions? |
#2
|
||||
|
||||
You can create your own document properties, but it would help if you told us the relevance of the additional date to the document.
If the document is a protected form you can insert a date form field, or, for an unprotected form, a date content control.
__________________
Graham Mayor - MS MVP (Word) (2002-2019) Visit my web site for more programming tips and ready made processes www.gmayor.com |
#3
|
|||
|
|||
Quote:
Its an unprotected form because the user needs to attached other document at the bottom of the form. I just need it to autopopulate automatically, not when saving the form or refreshing. Thanks! |
#4
|
||||
|
||||
In that case save the document as a template and create new documents from it. Insert a createdate field. That field will display the date the document is created.
__________________
Graham Mayor - MS MVP (Word) (2002-2019) Visit my web site for more programming tips and ready made processes www.gmayor.com |
#5
|
|||
|
|||
Quote:
Is there a way to have then choose the date and it would autopopulate to the other date field? |
#6
|
|||
|
|||
You can Shanghai one on the other document properties for your purposes. For example to use the one called "Status", insert it in the document and then select its tab.
Run this code: Sub ScratchMacro() 'A basic Word macro coded by Greg Maxey With Selection.ContentControls(1) .Type = wdContentControlDate .Title = "Date signed (or whatever)" End With End Sub Viola! See: http://gregmaxey.com/word_tip_pages/...ng_macros.html for instructions to employ the VBA code provided above. You could also create and map your own Date type content control. See: http://gregmaxey.com/word_tip_pages/...rol_tools.html |
#7
|
|||
|
|||
Quote:
Unfortunately, I cant get it to work. Do I need to change the title in the code to whatever I title the Content Control? I m using "Status" from document property. |
#8
|
|||
|
|||
Attached is a working example.
|
#9
|
|||
|
|||
Thats absolutely perfect! Thanks a million!
|
#10
|
|||
|
|||
Well actually it is really not perfect only a crude work around to your problem. More in line with perfect would be to create a mapped date content control and then copy and paste it where you wanted it values repeated. That is the purpose of the tool that I sent you the link for.
Glad your are satisfied though. |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Update Custom Document Property in Template | Byron Polk | Word VBA | 10 | 08-19-2014 07:19 AM |
creating a new TITLE property from text already within document | smndnm | Word VBA | 6 | 07-04-2014 08:27 PM |
Use document property as condition in IF field? | ChrisBrewster | Word | 2 | 01-29-2014 10:35 AM |
Custom Document Property Lost From Template | bhaughey | Word | 8 | 03-05-2013 02:11 PM |
QuickParts - custom document property | untttt | Word | 2 | 06-09-2011 05:24 PM |