17 February 2010

Setting Default Document Name in Word (2003)

To automatically set a default document name when saving a file to SharePoint, put the below code in your document template:

Private Sub Document_New()
Dim strTitle
strTitle = "My New Document - " & CStr(Month(Now()) & Day(Now()) & Year(Now()))
With Dialogs(wdDialogFileSummaryInfo)
.Title = strTitle
.Execute
End With
End Sub

No comments: