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 / August 2007

Tip: Looking for answers? Try searching our database.

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

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Aeronav - 18 Aug 2007 10:18 GMT
Good morning, I posted this questionin vba.customization but did not get an
answer, maybe here ?
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 - 22 Aug 2007 17:00 GMT
La réponse m'a été fournie dans le groupe microsoft.public.fr.word
Merci
 
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.