Page 1 of 1

watermark <date> DDMMYYYY

Posted: Thu Feb 09, 2012 12:55 pm
by icecurtain
The current BASE.VBS macro to create the watermark <date> is shown below can I tweak it to get DDMMYYYY? if I can what changes do I need to do?

Rem -- Debugging
Dim context
Set context = CreateObject("Scripting.Dictionary")
wscript.echo DateYYYYMMDD()
wscript.echo FileCounter()

Rem -- MACRO REGION BEGINS

Rem -- Return the current date in YYYYMMDD format
Function DateYYYYMMDD()
Dim retv, d

d = Now
retv = Right("0000" & Year(d), 4) & Right("00" & Month(d), 2) & Right("00" & Day(d), 2)
DateYYYYMMDD = retv
End Function

Re: watermark <date> DDMMYYYY

Posted: Sat Feb 11, 2012 6:08 pm
by admin
You can create a new macro:

Function DateDDMMYYYY()
Dim retv, d

d = Now
retv = Right("00" & Day(d), 2) & Right("00" & Month(d), 2) & Right("0000" & Year(d), 4)
DateDDMMYYYY = retv
End Function

Save the macro above in a .vbs file in the macros folder and use the following in your output specification <vbs:DateDDMMYYYY>

That should do the trick :-)