E
Ed
I have created a fairly nice looking, and very effective, 2007 ribbon.
It has lots of calls to my original 2003 project. (I reference the 2003
project via Tools/References. This is really sweet.)
Normally, I can get all the functionality I want because, if a ribbon
element (let's say a menu) needs to be reconfigured -- for example a dynamic
menu containing a list of documents created in the 2003 routine), I
complete the macro that calls the 2003 project with an 'invalidatecontrol'
command. Thus:
Sub GoodStuff()
call vbOldProject.module3.runthismacro
myribbon.invalidatecontrol "mycontrol"
End Sub
The challenge: I am currently working with a command that ultimately
calls a 2003 userform. The form is displayed in the 2003 project in
'modeless' fashion. That way, I (and my users) can edit text outside the
form while the form is still displayed. One of the buttons on the form,
however, is used (occasionally) to generate a list of terms that I want
shown in a dynamic menu in 2007. (The list of terms is saved out as a .txt
file. I want that file read and displayed by the dynamic 2007 menu when it
is invalidated and redrawn.)
However, because the form is modeless, the routine runs all the way to
the end, including running through the processing of the
"myribbon.invalidatecontrol" command found in the call from 2007 to 2003
(example above). So when the list of documents is generated and control is
returned to 2007, it is already passed the "myribbon.invalidatecontrol"
command.
Ideally, I need the Word2003 project itself to call the
'invalidatecontrol' command, but I cannot figure out how to get that to
happen. Can Word2003 vba call a Word2007 vba action?
It has lots of calls to my original 2003 project. (I reference the 2003
project via Tools/References. This is really sweet.)
Normally, I can get all the functionality I want because, if a ribbon
element (let's say a menu) needs to be reconfigured -- for example a dynamic
menu containing a list of documents created in the 2003 routine), I
complete the macro that calls the 2003 project with an 'invalidatecontrol'
command. Thus:
Sub GoodStuff()
call vbOldProject.module3.runthismacro
myribbon.invalidatecontrol "mycontrol"
End Sub
The challenge: I am currently working with a command that ultimately
calls a 2003 userform. The form is displayed in the 2003 project in
'modeless' fashion. That way, I (and my users) can edit text outside the
form while the form is still displayed. One of the buttons on the form,
however, is used (occasionally) to generate a list of terms that I want
shown in a dynamic menu in 2007. (The list of terms is saved out as a .txt
file. I want that file read and displayed by the dynamic 2007 menu when it
is invalidated and redrawn.)
However, because the form is modeless, the routine runs all the way to
the end, including running through the processing of the
"myribbon.invalidatecontrol" command found in the call from 2007 to 2003
(example above). So when the list of documents is generated and control is
returned to 2007, it is already passed the "myribbon.invalidatecontrol"
command.
Ideally, I need the Word2003 project itself to call the
'invalidatecontrol' command, but I cannot figure out how to get that to
happen. Can Word2003 vba call a Word2007 vba action?