I have been using IOleCommandTarget.Exec()
to execute the SaveAs
command successfully on InfoPath forms. However, it is failing on a client machine because IOleCommandTarget.QueryStatus()
only returns a value of OLECMDF_SUPPORTED
. To use the command, it needs to be both OLECMDF_SUPPORTED
and OLECMDF_ENABLED
.
What could be causing the command to be not enabled?
The reason the command was not available was because File -> Form Options -> Filler Features -> “Save and Save as” was unchecked on the form.