Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Word / Programming / June 2005

Tip: Looking for answers? Try searching our database.

VBA changes in Word 2003?

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Rick Charnes - 06 Jun 2005 16:02 GMT
We have a number of Word macros executed by our PowerBuilder application
that have been running fine for years.  These macros were written in
Word Basic, and I'm guessing Word dynamically converts them to VBA as
they're loaded.  Powerbuilder loads Word and executes the macro with
OLE.

We've upgraded to Word 2003, and we're now getting intermittent lock-
ups: the macro completes but afterwards the users find that both Word
and the Powerbuilder app have completely frozen.  Worse still, we can't
find any pattern to the intermittency.  It's agonizingly erratic.

Have there been changes in the way Office 2003 executes VBA code that
might be causing this problem?  Thanks for any help.
Howard Kaikow - 06 Jun 2005 21:55 GMT
Only step by step analysis will isolate the problems, there no general
answers for this type of problem.

Word only partially converts WordBasic to VBA, much of the code may still be
run via the WordBasic object, which does not always produce the same
behavior as in WordBasic.

Not to mention, but I will anyway, VBA is less forgiving than WordBasic. I
got caught once where I was using WB in an undocumented manner and VBA was
happy with that.

To avoid continuing problems, you may wish to convert all.part of the code
to (almost) pure VBA.
See http://www.standards.com/index.html?WordBasic2VBA.

Signature

http://www.standards.com/; See Howard Kaikow's web site.

> We have a number of Word macros executed by our PowerBuilder application
> that have been running fine for years.  These macros were written in
[quoted text clipped - 9 lines]
> Have there been changes in the way Office 2003 executes VBA code that
> might be causing this problem?  Thanks for any help.
Rick Charnes - 07 Jun 2005 18:39 GMT
Thanks.  Does a conversion utility exist to convert to VBA?

> Only step by step analysis will isolate the problems, there no general
> answers for this type of problem.
[quoted text clipped - 10 lines]
> to (almost) pure VBA.
> See http://www.standards.com/index.html?WordBasic2VBA.
Howard Kaikow - 07 Jun 2005 21:37 GMT
> Thanks.  Does a conversion utility exist to convert to VBA?

No.

When a Word6/7 template is import into Word 97, or later, Word autmatically
"converts" the code, but much of the code remains unconverted, e.g. Dialogs
are not converted to Userforms, but the code is largely untouched as
automatic conversion is not at all practical.

You can examine the code to see how many WordBasic objects are used, instead
of real VBA.

In general, unless the code is absolutely trivial, most WordBasic macros
require a significant rewrite, requiring significant expertise. It is much
easier to maintain/enhance VBA than working via the WordBasic object.
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.