Thank You very much Jon and Cody
This was the perfect piece of code just at the right time judging by the posting dates.
It has been translating beautifully except for one sentce which I was trying to translate (I am posting in the hope this may help out othe users, if they have a similar problem)
The sentence that gave me the problem was this
"I here by declare that I have completed all work as detailed above in accordance with any relevant Technical Manual and/or device documentation"
Translating it into French the translate function returned
"Je déclare ici par ce que je viens de terminer tous les travaux comme indiqué ci-dessus"
Which is only about half of the string.
THE PROBLEM was the the full French translation had a "," in it.
"Je déclare ici par ce que je viens de terminer tous les travaux comme indiqué ci-dessus , conformément à toute Manuel technique pertinente et / ou la documentation de l'appareil"
This meant the function for stripping out the desired part of the string was spliting it at the "," and I only got the translation up to that point
For lngItem = 3 To UBound(varSplitText)
strTransText = strTransText & Split(varSplitText(lngItem), ",")(0)
Next
THE SOLUTION
The returned translated string looks like this "[Translated Text]","[Original Text]"
so change the delimiter to a ", and it will be able to identify the end of the translated string insted of the the first comma
This is what I did
Dim delimitChar as string
delimitChar = Chr(34) & "," 'Chr(34) is the character for "
change the problem line to
For lngItem = 3 To UBound(varSplitText)
strTransText = strTransText & Split(varSplitText(lngItem), delimitChar)(2)
Next
I am just a novice, but this solved the problem for me.
Maybe there is a nicer way to do this?
Could you tell me if this might lead to other problems, with other translations?
Thanks again guys, top piece of code