Computer Forum Forum Index
Register  FAQ Profile Log in to check your private messages Log in Register 

Macro that worked well in Word XP, but does not in Word 2007

 
Post new topic   Reply to topic    Computer Forum Forum Index -> word vba customization
View previous topic :: View next topic  
Author Message
Aeronav
Guest





PostPosted: Thu Aug 16, 2007 3:03 pm    Post subject: Macro that worked well in Word XP, but does not in Word 2007 Reply with quote

Good morning,
I am using WIN XP SP2, Word XP and Word 2007 fully updated, all in french
versions.
French Windows uses normally the comma as decimal separator and you need it
if you want to calculate. Entering numbers with decimals in a Word table is
easier if the decimal point key translates your command in the comma.
I used this macro in Word XP, stored in Normal.dot :
------------------
Public Sub PointOuVirgule()
CustomizationContext = NormalTemplate
If KeyBindings(1).command = Chr(46) Then
KeyBindings.Add KeyCategory:=wdKeyCategorySymbol,
KeyCode:=BuildKeyCode(wdKeyNumericDecimal), command:=Chr(44)
StatusBar = "Tu as la virgule"
Else
KeyBindings.Add KeyCategory:=wdKeyCategorySymbol,
KeyCode:=BuildKeyCode(wdKeyNumericDecimal), command:=Chr(46)
StatusBar = "Tu as le point"
End If
End Sub
------------------
Char(46) is the decimal point, Chr(44) is the comma.
It worked very well in Word XP but if I try to use it in Word 2007 I always
get the character 255, that is ˙ , and I am stuck to it. To get back to the
normal behaviour and retrieve the decimal point I am obliged to go the
customization of the keyboard and hit "Reset" .
Has anybody a cure for that ?
Thanks
--
Aeronav
Back to top
Google
Sponsor





PostPosted: Thu Aug 16, 2007 3:03 pm    Post subject: Advertisement

Back to top
Aeronav
Guest





PostPosted: Wed Aug 22, 2007 4:02 pm    Post subject: Re: Macro that worked well in Word XP, but does not in Word Reply with quote

La réponse m'a été fournie dans le groupe microsoft.public.fr.word
Merci
Back to top
Display posts from previous:   
Post new topic   Reply to topic    Computer Forum Forum Index -> word vba customization All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Computer Forum