since these preserve the font (and all other characteristics) of the characters that are identical to whatever is in $oldtext.I also am comfortable with using definitions of the old text such as "\x{00BD}".The problem comes with any characters from wingdings. As a test I created a Word document that contained only a ‘pencil’ pointing from top right to bottom left.According to Word, this has a hex value of 0021. I then used the following three lines of Perl hoping to get the next wingding characters (scissors)$search-> {Text} = $oldtext; $replace-> {Text} = $newtext; $search-> Execute({Replace => wdReplaceAll});
$exec_res returned a value of 0 and the replacement had failed. Searching the net I found a site (http://www.alanwood.net/demos/wingdings.html) that was headedWingdings character set and equivalent Unicode characters. This showed that the Unicode Hex values for the pencil and scissors are U+270F and U+2702 respectively.Therefore I altered the search and replace lines to$search-> {Text} = "\x{0021}"; $replace-> {Text} ="\x{0022}"; $exec_res = $search-> Execute({Replace => wdReplaceAll});
and as this did not work even tried$search-> {Text} = "\x{270F}"; $replace-> {Text} = "\x{2702}";
which also failed. How can I overcome this failure? In my net searches I have found other instances where people have had problems with wingding and similar characters. Sadly none of these gave the answer I was looking for.$search-> {Text} = 'U' . "\x{270F}"; $replace-> {Text} ='U' . "\x{2702}";
In reply to Perl Word and Wingdings by merrymonk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |