N
Nelson F.
I am using Word to create reports/letters/etc that I need to save as PDF
files. I do not want to save the DOC files at all. My basic methodology now
is to do this:
-Open existing doc
-update fields
-print to Adobe PDF file
-close document
The problem is that Adobe PDF always assumes the document's filename as it's
naming convention - in Word's case it defaults to "DocumentX' (where X is a
number) as the filename and consequently the output file is named
DocumentX.PDF.
I have tried changing the title of the document as well as the caption but
nothing works. As a matter of fact this can be duplicated by openeing a new
document and performing the steps manually or running this VBA code:
sName = "My custom name"
Documents.Add Template:="Normal", NewTemplate:=False, DocumentType:=0
With Dialogs(wdDialogFileSummaryInfo)
.Title = sName
.Execute
End With
ActiveDocument.ActiveWindow.Caption = sName
If you now try to close the document it says "Save changes to DocumentX?"
even though the title and caption have been changed to "My custom name"...
BUT if you try to save the document it correctly shows "My custom name" as
the default...
I assume that the text DocumentX must be stored somewhere internally but I
cannot find it. I would really rather not save this document and have to
deal with problems of existing and in-use documents etc...
Any suggestions? Can I change the filename without actually saving the file?
files. I do not want to save the DOC files at all. My basic methodology now
is to do this:
-Open existing doc
-update fields
-print to Adobe PDF file
-close document
The problem is that Adobe PDF always assumes the document's filename as it's
naming convention - in Word's case it defaults to "DocumentX' (where X is a
number) as the filename and consequently the output file is named
DocumentX.PDF.
I have tried changing the title of the document as well as the caption but
nothing works. As a matter of fact this can be duplicated by openeing a new
document and performing the steps manually or running this VBA code:
sName = "My custom name"
Documents.Add Template:="Normal", NewTemplate:=False, DocumentType:=0
With Dialogs(wdDialogFileSummaryInfo)
.Title = sName
.Execute
End With
ActiveDocument.ActiveWindow.Caption = sName
If you now try to close the document it says "Save changes to DocumentX?"
even though the title and caption have been changed to "My custom name"...
BUT if you try to save the document it correctly shows "My custom name" as
the default...
I assume that the text DocumentX must be stored somewhere internally but I
cannot find it. I would really rather not save this document and have to
deal with problems of existing and in-use documents etc...
Any suggestions? Can I change the filename without actually saving the file?