I want to store today value in a string in VBA Word, e.g. today is Oct 04 2012, the string will be = "04102012". Any simple code can achieve that?


You would use something like -

Sub FormatNow()
    Dim myWorksheetName As String
    myWorksheetName = Format(Now, "mmmm_yyyy")
    MsgBox myWorksheetName
End Sub

Thanks, the code works perfectly well!

    Dim dateStr As String    
    dateStr = Format(Now, "ddmmyyyy")

Only a pleasure. Please mark as solved thanx.