Hi everyone
I have some code that generates a Word document (from Access VBA), and then leaves it on the screen (as ‘Document1’) for the user to edit and then save. (The document is not saved by code.) I want to set a default filesave name (that they could change when they save). I’ve found that Word uses the template’s title (if it has one) as the default save as name. Changing the new document’s title doesn’t change it’s default save as name.
Any ideas how I can set the default file saveas name?
Thanks
Peter
Dim wd As Object Dim doc As Word.Document Set wd = CreateObject("Word.Application") Set doc = wd.Documents.Add(Template:="blahblahthing.dot") With doc 'This sets the document's title, but Word uses the original title for the 'default filesave name. .BuiltInDocumentProperties(wdPropertyTitle) = "WeeklyReport" & _ "For" & UCase(sOfficer) & _ Format(dSTart, "d-mmm-yy") & "To" & Format(dEnd, "d-mmm-yy") ... wd.Visible = True doc.Activate