Creating VBA to add 14 days to an existing date

J

James

I use a program that creates Invoices within Microsoft
word.

It picks up certain data from the program and merges it
into Microsoft Word, such as the date of the invoice.

Can anyone help me create VBA that would add 14 days onto
the date of the invoice?


Regards

James
 
D

Doug Robbins

Format(DateAdd("d", 14, Now), "d MMMM yyyy")

--
Please respond to the Newsgroup for the benefit of others who may be
interested. Questions sent directly to me will only be answered on a paid
consulting basis.

Hope this helps,
Doug Robbins - Word MVP
 
J

JAmes

Doug,

I opened the word document and used ALT+F9 to toggle the
field and it showed the following:

{ QUOTE InvoiceDate\@ "DD MMMM YY" }

Therefore as per your note I tried to change (obviously I
did it wrong):

1) { FORMAT (DateAdd("d",14,InvoiceDate), "DD MMMM YY")}

When I try and create an invoice it comes back with:

Error! Bookmark not defined.

Regards
James
 
D

Doug Robbins

That was code to be used in a macro. You are in a Visual Basic newsgroup.

--
Please respond to the Newsgroup for the benefit of others who may be
interested. Questions sent directly to me will only be answered on a paid
consulting basis.

Hope this helps,
Doug Robbins - Word MVP
 
Top