Word VBA bugs (97/2000/xp/2003), how to get them solved?

R

Ronald

We use Word VBA on a daily basis to program solutions for clients. We
encounter Word bugs on a regular basis and usually we try to work around
them. Mainly because we don't know how to get Microsoft to fix them. I hope
this is the right place to post them, if not, I hope someone can point me in
the right direction.

The bugs are sometimes version independent and sometimes not. We try to make
our software backwards compatible, which is getting harder and harder.

BUG 1:
- open this Word document: http://www.n-tree.nl/bugs/b01.doc , in Word
97/2000/XP.
- select exactly the text '[testje]' (8 karakters) in the top box, this a
table in a frame.
- Open the VBA editor
- Open the direct dialog
- Execute: Selection.Range.Text=""
- The selected text should disappear, but it does not, the last two
characters are not deleted.
- In the other boxes (normal frame and normal table) it does work.
- In Word 2003 it works in all cases.
- Workarounds, like directly placing text in the selection with
Selection.Typetext "hallo" or Selection.Range.Delete in the other boxes, have
side effects in some Office versions. Range.Delete for instance deletes an
extra space, try placing two spaces after the ']' and you'll see one of it
will disappears, but it shouldn't.
Note: This bug is the same for bookmarks in the boxes, if you replace the
text in the bookmarks, the last two characters are also left behind.

BUG 2:
- When you try to open an document in the background, in the code behind an
open form, Word 2003 generates an error, other Word versions do not.
- Executed code behind a form: 'Documents.Open strFile' gives error:
Err.Number: 5479
Err.Description: You can not quit Word, because a Dialog Box is Active.
Switch to Microsoft Word first to close the Dialog Box.
- The VBA code does not close Word, so the error is not needed!

I hope anyone can confirm these bugs and hopefully solve them?

Thanks.
 
C

Cindy M -WordMVP-

Hi =?Utf-8?B?Um9uYWxk?=,
The bugs are sometimes version independent and sometimes not. We try to make
our software backwards compatible, which is getting harder and harder.
Microsoft does fix bugs, you can see that from "Bug 1", for example, which
apparently does not pertain to Word 2003. If your code has worked around a
problem, and the bug has been fixed, then you need to build a version check
into your code
If Instr(Application.Version, "11") <> 0 Then
'Word 2003 branch here
Else
'Branch for all other versions
End If

It's pretty certain that Microsoft is not going to go back and fix bugs in
earlier versions.
BUG 2:
- When you try to open an document in the background, in the code behind an
open form, Word 2003 generates an error, other Word versions do not.
- Executed code behind a form: 'Documents.Open strFile' gives error:
Err.Number: 5479
Err.Description: You can not quit Word, because a Dialog Box is Active.
Switch to Microsoft Word first to close the Dialog Box.
- The VBA code does not close Word, so the error is not needed!
What do you mean by "in the background"; please be specific.

Cindy Meister
INTER-Solutions, Switzerland
http://homepage.swissonline.ch/cindymeister (last update Jun 17 2005)
http://www.word.mvps.org

This reply is posted in the Newsgroup; please post any follow question or
reply in the newsgroup and not by e-mail :)
 
R

Ronald

Cindy M -WordMVP- said:
Microsoft does fix bugs, you can see that from "Bug 1", for example, which
apparently does not pertain to Word 2003. If your code has worked around a
problem, and the bug has been fixed, then you need to build a version check
into your code
If Instr(Application.Version, "11") <> 0 Then
'Word 2003 branch here
Else
'Branch for all other versions
End If

It's pretty certain that Microsoft is not going to go back and fix bugs in
earlier versions.

I understand that they won't fix bugs in Word 97 and maybe 2000, but they do
still support newer versions like xp and 2003. We encounter bugs regularly
and sometimes a service pack solves it or we find a workaround. Until
recently there was no believe that Microsoft would do anything about our
'minor' problems. First of all we work with OEM versions and Microsoft does
not support them, furthermore our supplier can hardly be expected to solve
these VBA issues.

I've tried tons of solutions and none worked for all Word versions, maybe a
version check can solve this, but I think in one case even a version check
wouldn't work, because different boxes respond differently within the same
Word version. I even tried the 'withintable' code. Anyway, I'll trie to get e
new clear picture of what happens and maybe it solves most of this problem.

Just for my understanding, what is the best way to inform Microsoft of bugs
in their software? These newsgroups? I don't know of this is a public or
private (msdn/partner) newsgroup, hard to tell from this microsoft website.
What do you mean by "in the background"; please be specific.

'In the background' is indeed confusing, I mean that I open a document in
the current instance of Word from the code behind my form (but my form is
visible and should stay in front of it), with the codeline stated above.

Ronald
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top