Thanks,
I'll give the links a read and try to go from there
Jimm
----- Shauna Kelly wrote: ----
Hi Jimm
Following is some code that will create two document properties holdin
the dates you need. If you're not sure what to do with the macro, se
http://www.gmayor.dsl.pipex.com/installing_macro.htm an
http://www.mvps.org/word/FAQs/MacrosVBA/CreateAMacro.ht
Now, in your document where you want the date to appear, create a fiel
like { docproperty "6months" \@ "dddd, d MMMM yyyy" } and { docpropert
"6monthsPlusOneDay" \@ "dddd, d MMMM yyyy" }
Note that you can't type the {} braces by hand. You must use ctrl-F9 an
type between the braces that Word inserts for you. Once you've typed th
field, use F9 to update it, or ctrl-a F9 to update all fields in th
document
Hope this helps
Shauna Kelly. Microsoft MVP
http://www.shaunakelly.com/wor
Option Explici
Sub AutoOpen(
'Shauna Kelly, 2 February 200
'For microsoft.public.word.docmanagemen
Dim dCreateDate As Dat
'Delete any existing document propertie
On Error Resume Nex
ActiveDocument.CustomDocumentProperties("6months").Delet
ActiveDocument.CustomDocumentProperties("6monthsPlusOneDay").Delet
On Error GoTo
'Calculate the document creation dat
dCreateDate
ActiveDocument.BuiltInDocumentProperties(wdPropertyTimeCreated
'Create a document property for 6 months after creation dat
ActiveDocument.CustomDocumentProperties.Add
Name:="6months",
LinkToContent:=False,
Type:=msoPropertyTypeDate,
Value:=DateAdd(Interval:="m", Number:=6, Date:=dCreateDate
'Create a document property for 6 months + 1 day after creation dat
ActiveDocument.CustomDocumentProperties.Add
Name:="6monthsPlusOneDay",
LinkToContent:=False,
Type:=msoPropertyTypeDate,
Value:=DateAdd(Interval:="d", Number:=1
Date:=ActiveDocument.CustomDocumentProperties("6months")
End Su