Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Running Word 6, 7, or 8???
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00173965
Message ID:
00177492
Views:
31
>I don't know for certain...but I'd hazard a guess: yes, you'll have to find out what the appInfo / progInfo / prgmInfo equivalent is for each language (unfortunately MS decided to translate it) and put the appropriate case statement into the makeWord function.
>
>What I did was create my own wordClass wrapper and subclassed it for the various languages (makeWord then returns either NULL or the appropriate language object).
>
>The base class uses the standard (well, for me) English command names (e.g. fileClose) and passes them to the OLE word object. Derived classes (e.g. danskWord) have the same-name exposed methods but call the underlying word object in the appropriate language. That way you can write all your routines ignoring the underlying language, and add other languages as you go.
>
>E.g.
>
>In the base object I have a method .editselectall which calls the Word OLE object (wo)...
>
>this.wo.editSelectAll
>
>In the Dansk version I have the same method (inherited from the base class) but it is phrased:-
>
>this.wo.RedigerMarkerAlt
>
>Note that this works very well - I don't know about SvenskWord but DanskWord was only partially translated (i.e. a lot of the commands remain in English) so only about 60% of the commands had to be changed.
>
>Watch out for things like CommandValid-GyldigKommando and editGotoPage-redigerGaTil (where you pass the string to test) as the passed string has to be translated *as well as* the command.
>
>...and If you think this is messy, I originally had it in Access 2 with NO classes...

Hi Robert,

Thanks for your reply, now it makes sence why the english funcs didn't work.
But now I have another problem and perhaps you have a solution for this.

This will not work:

oWordBasic = CREATEOBJECT('Word.Basic')
oWordBasic.Appshow
oWordBasic.FileNew.Template = 'TEMPLATE.DOT'

The following error occurs:
FileNew does not evaluate to an object member.

If you look in WordBasic it should be something like this:

FileNew .Template = 'TEMPLATE.DOT'

How do you call this func from VFP5???

/Magnus
Magnus Nordin
VFP MCP

"We have tested the GUI on 5-year olds. Why? Beacuse they aren't braindead!"
Michael Spindler, Apple

Previous
Next
Reply
Map
View

Click here to load this message in the networking platform