|
|
|
date: Thu, 1 Nov 2007 17:03:53 +0800,
group: microsoft.public.word.vba.beginners
back
Re: Word XP macros in Word 2007
The conversion between Word 6 and Word 97 involved the change from WordBasic
to VBA. There's no such conversion between Word 2002 and Word 2007, as they
both use the same VBA.
There are some new objects and methods in Word 2007, of course, and if you
use them in macros you write in Word 2007 and try to run the macros in Word
2002 then you will get compilation errors. The easiest solution is not to
use any of the new objects. Fortunately, a new feature of the VBA help in
2007 is a notice at the top of a help topic if it describes something new.
If you can't or won't avoid new things, you'll have to segregate them into
modules that get loaded only if the current Word instance is 2007.
There are also some things in Word 2002 that will no longer work, or at
least work correctly, in Word 2007. The main things to look out for are
custom toolbars and menus (CommandBar objects and their descendants) and
AutoTextEntries, and some of the Options members.
--
Regards,
Jay Freedman
Microsoft Word MVP FAQ: http://word.mvps.org
Email cannot be acknowledged; please post all follow-ups to the newsgroup so
all may benefit.
robot wrote:
> Hello,
>
> I am using Word XP, considering upgrading to Word 2007.
>
> I am concerned about opening my XP documents using Word 2007, because
> I remember that ages ago, Word 6 macros, once opened by Word 97, are
> automatically converted to Word 97 (vba) macros, and can never again
> be opened by Word 6.
>
> What will happen to my Word XP macro if the document containing the
> macro is opened in Word 2007? I hope to use my XP macros in both Word
> XP and Word 2007 if possible.
>
> Suggestions are most welcome!
date: Thu, 1 Nov 2007 12:06:59 -0400
author: Jay Freedman
Re: Word XP macros in Word 2007
Hi Jay,
Thank you very much for your help.
"Jay Freedman" ¼¶¼g©ó¶l¥ó·s»D:%23oan8EKHIHA.1208@TK2MSFTNGP03.phx.gbl...
> The conversion between Word 6 and Word 97 involved the change from
> WordBasic to VBA. There's no such conversion between Word 2002 and Word
> 2007, as they both use the same VBA.
>
> There are some new objects and methods in Word 2007, of course, and if you
> use them in macros you write in Word 2007 and try to run the macros in
> Word 2002 then you will get compilation errors. The easiest solution is
> not to use any of the new objects. Fortunately, a new feature of the VBA
> help in 2007 is a notice at the top of a help topic if it describes
> something new. If you can't or won't avoid new things, you'll have to
> segregate them into modules that get loaded only if the current Word
> instance is 2007.
>
> There are also some things in Word 2002 that will no longer work, or at
> least work correctly, in Word 2007. The main things to look out for are
> custom toolbars and menus (CommandBar objects and their descendants) and
> AutoTextEntries, and some of the Options members.
>
> --
> Regards,
> Jay Freedman
> Microsoft Word MVP FAQ: http://word.mvps.org
> Email cannot be acknowledged; please post all follow-ups to the newsgroup
> so all may benefit.
>
> robot wrote:
>> Hello,
>>
>> I am using Word XP, considering upgrading to Word 2007.
>>
>> I am concerned about opening my XP documents using Word 2007, because
>> I remember that ages ago, Word 6 macros, once opened by Word 97, are
>> automatically converted to Word 97 (vba) macros, and can never again
>> be opened by Word 6.
>>
>> What will happen to my Word XP macro if the document containing the
>> macro is opened in Word 2007? I hope to use my XP macros in both Word
>> XP and Word 2007 if possible.
>>
>> Suggestions are most welcome!
>
>
date: Fri, 2 Nov 2007 10:07:12 +0800
author: robot
|
|