G
Gary Hillerson
Hi,
I've got a template that features in menu in earlier versions of Word,
and when it runs in Word 2007, I want it to use a tab on the ribbon
instead. I've got the tab working, and I know how to dynamically
determine (from Application.Version) if I'm running in Word 2007, so I
can make it work.
BUT: the module that works with the ribbon includes some declarations
(such as iRibbonControl) that are not available in earlier versions of
Word. So I don't think this code will work with earlier versions.
What's the best way to handle this? Is there a way to conditionally
compile the code? I know i can conditionally compile for a Macintosh
by including
#if Mac Then
'this code only included on mac versions
#Else
'this code only include on PC versions
#End If
but I don't know how to set up a condition like that "Mac" condition
that's built into VBA.
The only other way i can think to do this is to declare the
iRibbonControl parameters in my ribbon callbacks as variants. I assume
that would work, tho it makes the code a bit tougher to understand.
Any advice appreciated
thanks,
gary
I've got a template that features in menu in earlier versions of Word,
and when it runs in Word 2007, I want it to use a tab on the ribbon
instead. I've got the tab working, and I know how to dynamically
determine (from Application.Version) if I'm running in Word 2007, so I
can make it work.
BUT: the module that works with the ribbon includes some declarations
(such as iRibbonControl) that are not available in earlier versions of
Word. So I don't think this code will work with earlier versions.
What's the best way to handle this? Is there a way to conditionally
compile the code? I know i can conditionally compile for a Macintosh
by including
#if Mac Then
'this code only included on mac versions
#Else
'this code only include on PC versions
#End If
but I don't know how to set up a condition like that "Mac" condition
that's built into VBA.
The only other way i can think to do this is to declare the
iRibbonControl parameters in my ribbon callbacks as variants. I assume
that would work, tho it makes the code a bit tougher to understand.
Any advice appreciated
thanks,
gary