Good afternoon,
I am not sure which forum I should direct this question to, but any assistance is very much appreciated.
I have a word template, that is called from MS Access for reporting purposes. Within that template I would like to create a field, and have it updated with a Month/Year. The only problem is that the Month needs to be set to the previous month of any month that the report is printed.
I tried setting the Date equal to a variable used in a DateAdd function, but I get an error. I can insert the new date into a document, but i need to make it inserted into a field. This is the code I currently have:
Dim mBefore As Date
mBefore = Format(DateAdd("m", -1, Date), "mmmm yyyy") 'return prior month
Selection.InsertBefore mBefore