loDoc = loWord.Documents('c:\temp\MyDoc.doc') loDoc.PrintOut(.f., .f., 0, '',,,,1)This also works:
loDoc = loWord.Documents(1) loDoc.PrintOut(.f., .f., 0, '',,,,1)This does not work:
loWord.Documents('c:\temp\MyDoc.doc').PrintOut(.f., .f., 0, '',,,,1)This also does not work:
loWord.Documents(1).PrintOut(.f., .f., 0, '',,,,1)Why does it work if I use a refrence to a document created on a separate line (loDoc), but not if created on the same line as the PrintOut?