D
Dian Chapman
Hi folks...
I'm going nuts with a project that keeps giving me a command fail and
I can't figure out why. The app is a custom word app <--> Access DB.
At some points, I want to allow the user to just close the current
document without saving. Due to security reasons, I have to capture
all the save/close commands to run through the custom code so the user
can't save a document outside the scope of the application/DB.
I've tried ever version of:
'Application.Documents.Close SaveChanges:=wdDoNotSaveChanges
ActiveDocument.Close SaveChanges:=wdDoNotSaveChanges
to get the current document to just close and not save any changes,
should the user elect to toss away and current modifications. But I
continually get a Command Failed error at this point!?!?!?!?
The current doc may or may not have had changes to it. It could be a
locked doc, it could already have a name, it could have been saved
with a password, it could be a blank form doc...depending on when the
user decides to bail, if they do. I thought I've taken into
consideration every scenario...but something is causing this error and
I just can't figure out what/why.
Any thoughts?
TIA...
Dian ~
I'm going nuts with a project that keeps giving me a command fail and
I can't figure out why. The app is a custom word app <--> Access DB.
At some points, I want to allow the user to just close the current
document without saving. Due to security reasons, I have to capture
all the save/close commands to run through the custom code so the user
can't save a document outside the scope of the application/DB.
I've tried ever version of:
'Application.Documents.Close SaveChanges:=wdDoNotSaveChanges
ActiveDocument.Close SaveChanges:=wdDoNotSaveChanges
to get the current document to just close and not save any changes,
should the user elect to toss away and current modifications. But I
continually get a Command Failed error at this point!?!?!?!?
The current doc may or may not have had changes to it. It could be a
locked doc, it could already have a name, it could have been saved
with a password, it could be a blank form doc...depending on when the
user decides to bail, if they do. I thought I've taken into
consideration every scenario...but something is causing this error and
I just can't figure out what/why.
Any thoughts?
TIA...
Dian ~