![]() |
#6
|
|||
|
|||
![]()
Is this really the name of the property:
"RandomNumbe r" The following creates a new document based on the template and places a new random number in both the template and the new document just created. Code:
Sub AutoNew() Dim lngNewRandNumber Randomize lngNewRandNumber = Int((1000 * Rnd) + 1) 'Updates the template property. ThisDocument.CustomDocumentProperties("RandomNumber").Value = lngNewRandNumber 'Updates the document you have just created. ActiveDocument.CustomDocumentProperties("RandomNumber").Value = lngNewRandNumber End Sub |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
![]() |
New Daddy | Word | 7 | 02-24-2017 03:52 PM |
![]() |
anandyrh | Word | 1 | 08-14-2013 12:08 AM |
Custom Document Property Lost From Template | bhaughey | Word | 8 | 03-05-2013 02:11 PM |
![]() |
untttt | Word | 2 | 06-09-2011 05:24 PM |
Update Document Template when Saving the Document File | bjbercaw | Word | 3 | 11-16-2010 02:03 PM |