Results 1 to 4 of 4
  1. #1
    3 Star Lounger
    Join Date
    Mar 2003
    Location
    Elkins Park, Pennsylvania, USA
    Posts
    325
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Inserting Japanese Characters through VBA (Word XP)

    Hi. Hopefully this question will have a quick and relatively painless answer!

    I have been tasked with adapting a word template of mine for use at our site in Japan. To my knowledge, they use the same workstation image/configuration that we do here, with respect to hardware, OS, Office version, etc.. The primary function of the code I've written and which i need to adapt is to clean, adjust, and format reference citations according to formal guidelines. After consulting with a team from our sister site in Japan, I have been given a sort of "translation" model to use, which I am attaching to this post. I've added text to the samples, which essentially documents the double-byte characters that I think I would need to use.

    My question, simply put, is What must I be aware of when adapting my code to insert the characters shown in the attached Word file? So far, I think I have been able to determine the correct Unicode values, but am I on the right track when I assume that's the approach to take? If I go to the immediate window and try Print Selection.InsertAfter ChrW(34920), I get the character for "Table"; but just because I can do it on my machine, does that mean it will work elsewhere? Do I have to be conscious of what font might be being used at the insertion point when this command is run?

    ANY help and advice would be greatly appreciated!
    Attached Files Attached Files
    <font face="Comic Sans MS">That's what you do in a herd; you look out for each other!</font face=comic> - Mike

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Inserting Japanese Characters through VBA (Word XP)

    Simply executing Selection.InsertAfter ChrW(34920) on my (Dutch) system results in a box character. I have to select a font such as Arial Unicode MS or MS Mincho to see a Japanese character.

    We have several Loungers based in Japan, I hope they will have useful suggestions for you.

  3. #3
    Plutonium Lounger
    Join Date
    Nov 2001
    Posts
    10,550
    Thanks
    0
    Thanked 7 Times in 7 Posts

    Re: Inserting Japanese Characters through VBA (Word XP)

    I'll offer you one warning, from my own painful experience of supporting Japanese translations of VBA code.

    Make absolutely sure that you only use standard ASCII characters in the VBE. I had a few instances of quoted strings from other European languages, and discovered - with great difficulty - that the particular combination [b]<big>

  4. #4
    3 Star Lounger
    Join Date
    Mar 2003
    Location
    Elkins Park, Pennsylvania, USA
    Posts
    325
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Inserting Japanese Characters through VBA (Word XP)

    I can't IMAGINE how long it took to figure that one out. I have been told that, in Japan, they are using the exact same "image" as we use here in Pennsylvania, but I will certainly ask them to check it. Also, in light of your problem, I will actually export all of the code and check to make sure no character values are above 128.

    As for the compatible fonts, I will simply make sure that the code formats the insertion point as MS Mincho before inserting the string.

    I'm sure this will take more than one "stab" at it, but I'd like to minimize the obstacles from the outset!
    <font face="Comic Sans MS">That's what you do in a herd; you look out for each other!</font face=comic> - Mike

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •