Hi,
Thanks for this, but I already tried it, and it doesn't work. Word is
obviously fooled into thinking that something within the document is changed
when it is printed, but whatever the something is, I cannot find it. There
are no PrintDate fields.
So, I am still at a loss.
The other thing I have found is that if I open the document read-only, then
there is no "Do you want to save changes..." message after a print.
However, if a user genuinely has changed the document, when he closes it, he
gets the "Save as..." dialogue, and we don't want users saving the document
under different names (in fact, when I run Word, I make "Save As..."
invisible on the menu).
So, I'm stuck between a rock and a hard place currently, and it's an
uncomfortable place to be, I can tell you.
Gem
>> Hi,
>>
[quoted text clipped - 27 lines]
>
> http://www.progresstalk.com/printthread.php?t=25614
Steve Yandl - 19 Jan 2005 15:14 GMT
I've used what follows in a few scripts. oWd is my Word Application object.
oWD.ActiveDocument.Close wdDoNotSaveChanges
oWD.Quit
Set oWD=Nothing
Steve
> Hi,
>
[quoted text clipped - 49 lines]
>>
>> http://www.progresstalk.com/printthread.php?t=25614
Gemma M - 19 Jan 2005 15:31 GMT
Thanks Steve,
Unfortunately, what is happening is VBScript is opening the document in Word
and then allowing the user to close it when he has finished with it (after
printing it, etc). So, once Word is running, VBScript has not control over
what is happening. But the users do not consider printing a document as
changing it, so they are confused about the save-changes message.
However, I think I may have found out the problem. In some documents, the
Document.BuiltinDocumentProperties.Item(10) contains a valid LastPrintedDate
value, and some do not. If I can make that date invalid, then Word will
neglect to update it when the document in printed.
So, does anyone know how to make the "Last Printed Date" built-in property
invalid, so that printing the document does not update it? (I might post
this as a new query)
Gem
> I've used what follows in a few scripts. oWd is my Word Application
> object.
[quoted text clipped - 58 lines]
>>>
>>> http://www.progresstalk.com/printthread.php?t=25614