I am trying to change the proposed filename within the "Save As
"-Dialog based on the content of a Content Control.
My understanding was that Word is proposing the Document Property „Title
“ within the SaveAs
Dialog.
Within an empty Document I created a Content Control (Text only) and put the following code in "This Document".
Private Sub Document_ContentControlOnExit(ByVal objCC As ContentControl, _
Cancel As Boolean)
ActiveDocument.BuiltInDocumentProperties("Title") = objCC.Range.Text
End Sub
The built-in Property "Title
" changed on leave as expected but pressing the Save As Button did not change the proposed filename.
Cancelling the "SaveAs
"-Dialog and opening it once again (without any other actions in between) the "new" Title was proposed as default filename.
Process:
1. Change Title to „New Filename“
2. Press Save As -> Proposed Filename „Doc1“
3. Cancel Save As
4. Press Save As -> Proposed Filename „New Filename“
5. Change Title to „Better Filename“
6. Press Save As -> Proposed Filename „New Filename“
7. Cancel Save As
8. Press Save As -> Proposed Filename „Better Filename“
...
Is there a Workaround to this "Feature" or am I just wrong?
I may have misunderstood
This yields "Asparagus"
And that is also the proposed FileName on save.