Hi John,
Well, VBA is supposed to be one of the reasons they invited me to this
party. I can assure you, it was not my table manners!
)))))
So you tell me exactly what you want it to do and I will code it up and post
it here.
That's very kind of you John,
Actually in the meanwhile I decided to dig a little bit in the options I had
and created the macro myself
))
Here is what I wanted:
Sub Fr()
'
' Fr Macro
' Macro recorded 14/05/04 by Corentin Cras-Méneur
'
Selection.LanguageID = wdFrench
Selection.NoProofing = False
End Sub
I assigned the Macro to a button in my Toolbar. It took me a little while to
figure out what I needed but I'm really glad I found it (especially since I
realized afterwards I could have simply recorded the Macro....... :->>> )
The Macro is amazingly simple, but there was still a few things I had a hard
time finding when I first looked for them. I found the second argument after
playing with the record function (I would have never thought of it by
myself...).
I assume you want to switch the language on Normal Style? (That switches
the language for the whole document under most circumstances...)
Nope, just on a selection. For Normal, I can simply create a template for
French and duplicate for English. That's a lot easier for me.
I assume you want to scan the text and find any instances of a non-complying
language? I have code to do that around here somewhere...
Nope, I can spot these outs easily because almost every word gets underlined
by the proofing tools
)
I assume you would like to check for a selection, and if there is one, mark
the selected text with a particular language?
That's exactly it
)
Would you want to check for the availability of a specific custom
dictionary? And enable it if found? And create it if not?
Nope, I'll make other buttons for other languages if I need them but I'm
pretty much all set. What I needed was pretty simple, I spent way too much
time trying to find out how to add the button from the customization options
and never really thought about the possibility to do it through VBA.
Since I know you are a damned fine coder in plenty of other languages, how
about you code up what you want as a Use Case in P-Code, and I will turn it
into VBA for you...
That could have been an interesting option
) Anyway I got it now. I should
really get to know more about VBA... (I really need more free time for this
kind of things...).
Thanks a lot for your help John,
Corentin