ActiveDocument.name is read-only. Is there any possible way to change the name of the open, active document (keeping it open) in code without doing a "save as"?
The process I need to go through for my project is this:
open the document
for each customer
add one line of text specific to this customer
change name of document (based on customer name)
convert to PDF
next customer
notes:
The line of text goes in the same place each time.
The rest of the document remains the same.
To have to "save as" each time will leave me with a whole bunch of document files that I don't need.
I'm only interested in the PDFs.
It would also add considerable time having to save the file each time.
I have had tried something akin to your method except instead of renaming, I tried to move/copy the resulting file after each PDF creation. I had much trouble in that I could not get the macro to wait until the PDF was fully made (believe me I tried 100 different ways; ways which should have worked; including a waiting loop which just waited forever), thus generating an error by trying to copy too soon. I suspect I will get the same with a rename command, but I'll give it a go nonetheless.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.