I'm having weird issues with the setValue function when working with word templates.
At first, it seemed that PHPWord was randomly skipping some setValue requests, despite the fact the search string matched the equivelant string in the word document.
After a couple of hours playing, I finally worked out that if a string was flagged as misspelled by the word spellchecker, the string would not be replaced.
I resolved the issue by simply turning off the spellchecker, and retyping all the strings. It sounds bizarre, and totally unfeasable, but it did work.
I can only assume that word somehow flags mispelled words in the xml when you save the file, which then interferes with PHPWord's parsing. I don't have time to go into the xml, but I presume this is the case.
So, if anybody has any issues with setValue not finding strings, try turning off spellcheck. It might just work