S
spm
I have an app which currently automates the creation of user documents
via any version of Word up to Word 2003, and am attempting to update it
to support Word 2007. The app works fine with Word 2003 (and below).
I worked on upgrading the app to support automation via Word 2007,
using the Beta 2 release of Word 2007, and all worked fine except for
an issue with setting AutoFormatXXX properties: I reported this issue
previously, and then installed the Word 2007 Beta 2 Technical Refresh
(B2TR) and re-imported the Word 2007 Object Library for use with my app.
Now, the AutoFormatXXX properties all work as expected, but now all
sorts of other problems occur:
1. Calls to a document's Styles.Add function fail with an access
violation. Styles.Add2003, however, works fine. I have tried Styles.Add
with various values for the last parameter, using each of True, False,
and empty in turn, and all fail.
2. Calls to a document's InlineShapes.AddPicture work OK and seem to
return a valid object, but subsequent efforts to set the Shape object's
properties often cause an E_FAIL (0x80004005) error. This is not
consistent, as sometimes they work and at others they fail, using the
exact same data.
3. Apparently random "Type mismatch" errors. Sometimes a call succeeds,
but then fails on the next test run with the same data. This happens on
different functions, nit always the same.
Note: None of these issues occurred (with the same codebase) with Word
2007 B2, nor with earlier versions of Word, so they are new to the
B2TR. This seems like a significant backward step. Assistance is kindly
requested.
via any version of Word up to Word 2003, and am attempting to update it
to support Word 2007. The app works fine with Word 2003 (and below).
I worked on upgrading the app to support automation via Word 2007,
using the Beta 2 release of Word 2007, and all worked fine except for
an issue with setting AutoFormatXXX properties: I reported this issue
previously, and then installed the Word 2007 Beta 2 Technical Refresh
(B2TR) and re-imported the Word 2007 Object Library for use with my app.
Now, the AutoFormatXXX properties all work as expected, but now all
sorts of other problems occur:
1. Calls to a document's Styles.Add function fail with an access
violation. Styles.Add2003, however, works fine. I have tried Styles.Add
with various values for the last parameter, using each of True, False,
and empty in turn, and all fail.
2. Calls to a document's InlineShapes.AddPicture work OK and seem to
return a valid object, but subsequent efforts to set the Shape object's
properties often cause an E_FAIL (0x80004005) error. This is not
consistent, as sometimes they work and at others they fail, using the
exact same data.
3. Apparently random "Type mismatch" errors. Sometimes a call succeeds,
but then fails on the next test run with the same data. This happens on
different functions, nit always the same.
Note: None of these issues occurred (with the same codebase) with Word
2007 B2, nor with earlier versions of Word, so they are new to the
B2TR. This seems like a significant backward step. Assistance is kindly
requested.