Hello,
This is a question related to Word 2010. If a moderator sees this and deems it inappropriate for this forum, I understand. In such a case, please remove immediately.
I've searched extensively but haven't found a way to correct this run-time error 5487 which is indicating a file permission error.
The above code doesn't work and I can't determine how to fix it.
Thank you in advance for your help.
This is a question related to Word 2010. If a moderator sees this and deems it inappropriate for this forum, I understand. In such a case, please remove immediately.
I've searched extensively but haven't found a way to correct this run-time error 5487 which is indicating a file permission error.
Code:
ChangeFileOpenDirectory FoldertoSaveIn
DocName = ActiveDocument.Paragraphs(4).Range
ActiveDocument.SaveAs2 FileName:=DocName & " " & Format(Now, "dd-mm-yyyy hh.mm.ss") & ".docx", FileFormat:=wdFormatDocumentDefault
ActiveDocument.Close
The above code doesn't work and I can't determine how to fix it.
Thank you in advance for your help.