351

You anticipate that you prefer Powershell.-Contro (February 02, 2021, 06:04 PM)
I don't anticipate that I prefer PowerShell ...
I only use PowerShell.-4wd (February 02, 2021, 08:47 PM)






4wd i will try and commentCode: Visual Basic [Select]
Sub FindAndReplaceMultiItems() Dim strFindText As String Dim strReplaceText As String Dim nSplitItem As Long Application.ScreenUpdating = False ' Enter items to be replaces and new ones. strFindText = InputBox("Enter items to be found here,seperated by | (vertical bar): ", "Items to be found") strReplaceText = InputBox("Enter new items here, seperated by | (vertical bar): ", "New items") nSplitItem = UBound(Split(strFindText, "|")) ' Find each item and replace it with new one respectively. For nSplitItem = 0 To nSplitItem With Selection .HomeKey Unit:=wdStory With Selection.Find .ClearFormatting .Replacement.ClearFormatting .Text = Split(strFindText, "|")(nSplitItem) .Replacement.Text = Split(strReplaceText, "|")(nSplitItem) .Format = False .MatchWholeWord = False End With Selection.Find.Execute Replace:=wdReplaceAll End With Next nSplitItem Application.ScreenUpdating = True End Sub
Try that, it uses | instead. (Not tested since I'm on a tablet.)-4wd (January 27, 2021, 05:33 PM)


!!!!!!!!!



I am doing something wrong.
No replaces at all.-Contro (January 26, 2021, 10:03 AM)
That's because it looks for *.docx files by default, you need to change it to *.doc.
Changing it to *.doc? would probably do both types but I haven't tested it.Code: Text [Select]or
strFile = Dir(strFolder & "\" & "*.doc", vbNormal)Code: Text [Select]
strFile = Dir(strFolder & "\" & "*.doc?", vbNormal)-4wd (January 26, 2021, 06:49 PM)


Try HandyFile Find and Replace Text Aid Kit Office Edition. It definitely isn't free. Web site blocked by Malwarebytes, but they tend to false positives. I used an old edition of HFFR years ago for other purposes.I have visited this webpage. https://silveragesoftware.com/index.php-rjbull (January 26, 2021, 02:41 PM)


Then running to try.Ojú !!!!!!!!!! Then you don't have used datanumen .
I would prefer an advice if you are using this tool or know at first hand someone doing.-Contro (January 24, 2021, 07:17 PM)
No problem ... however that VBA module is from 2017 and I've just tested it on Word 2003 and it worked ...-4wd (January 25, 2021, 07:28 PM)


Ojú !!!!!!!!!! Then you don't have used datanumen .You can give this a try:I am trying long time ago with this sort of program.
https://www.datanume...iple-word-documents/-4wd (January 24, 2021, 06:21 PM)
So : Have you try that script or the program ? Do you use this program ?-Contro (January 24, 2021, 07:17 PM)
I don't have/use Word or VBA, if I did I'd probably use PowerShell interfacing to Word to do the same thing instead.-4wd (January 25, 2021, 02:25 AM)