Jump to content

Recommended Posts

Posted (edited)

Hello,

In my attempts to use the subject function (_WorDocFindReplace) with an array, I've run into the problem that is capitalizes everything replaced, is there a reason for that and a way to turn it off? Attached is my sample script and a document.

Please note that you will need to change the file path.

WordDocFindReplace.au3

Test.doc

Thanks ahead of time for the help.

Edited by RegularGuy
Posted

Apparently the $b_MatchCase parameter not only affects when a match if found, but also the behavior of the replacement text.

Setting it to 1 (True) leaves the case of your replacement text intact, but would affect the search in that searching for "C-11" would not match "c-11"

_WordDocFindReplace($oDoc,$Alphabet[$i][0],$Alphabet[$i][1], 2, 0, 1)
Posted

Wow, Great find. I thought it might have something to do with the extra parameters, but I just didn't know which one. Thanks for your help that solved it!

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...