First, I suggest you use Option Explicit. That way you'll trap errors like:
.Destination = wdSendtToNewDocument
As for the File Permission Error, that suggests you're trying to save to a non-existent folder, a folder you don't have write permissions for, or over a file that your system regards as being in-use.
You might also try using SaveAs2 and incorporating the file format & compatibility parameters. For example:
.SaveAs2 FileName:=myPath & "\" & rpt_od & ".docx", FileFormat:=wdFormatXMLDocument, CompatibilityMode:=wdCurrent
perhaps event with AddToRecentFiles:=False
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
|