![]() |
|
#1
|
|||
|
|||
|
Replace or insert character chains of more of 254 characters in word 2010.
How can i do this. The find and replace option only accepts chains less 254 characters. How can I find and replace chains of more 254 characters ? Can i use wild cards ? Regular expressions ? Best Regards |
|
#2
|
||||
|
||||
|
Wildcards (regular expressions) is certainly one possibility, but you really haven't given us anything to work with.
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
|
#3
|
|||
|
|||
|
this is the original string :
"driver kali linux para el adaptador usb alfa negro https://github.com/astsam/rtl8812au . ifi card on an virtualbox's ubuntu http://askubuntu.com/questions/28201...ualboxs-ubuntu two folders i12213154654654646464646n different pc to synchronize. I would like to know is FFS is able to sync when a file is moved or deleted from one of the folders without problem. s able to detect theses changes ? Or simple synchronize attending to the actual and present files and folders ? Best Regards http://www.freefilesync.org/forum/viewtopic.php?f=2&t=4197*" This is the string to replace the original one : "driver kali linux para el adaptador usb alfa negro https://github.com/astsam/rtl8812au . ifi card on an virtualbox's ubuntu http://askubuntu.com/questions/28201...ualboxs-ubuntu two folders in different pc to synchronize. I would like to know is FFS is able to sync when a file is moved or deleted from one of the folders without problem. s able to detect theses changes ? Or simple synchronize attending to the actual and present files and folders ? Best Regards http://www.freefilesync.org/forum/viewtopic.php?f=2&t=4197*" And the string to replace the original one is : "driver kali linux para el adaptador usb alfa negro https://github.com/astsam/rtl8812au . ifi card on an virtualbox's ubuntu http://askubuntu.com/questions/28201...ualboxs-ubuntu two folders in different pc to synchronize. I would like to know is FFS is able to sync when a file is moved or deleted from one of the folders without problem. s able to detect theses changes ? Or simple synchronize attending to the actual and present files and folders ? Best Regards http://www.freefilesync.org/forum/viewtopic.php?f=2&t=4197*" How can i do that ? Can I mark someway the start and end of any portion of text to be replaced ? Best Regards |
|
#4
|
|||
|
|||
|
Just break it up into portions:
Code:
Sub ReplaceBigPortions()
Selection.Find.ClearFormatting
Selection.Find.Replacement.ClearFormatting
With Selection.Find
.Text = "driver kali linux para el adaptador usb alfa negro https://github.com/astsam/rtl8812au . ifi card on an virtualbox's ubuntu http://askubuntu.com/questions/28201...ualboxs-ubuntu two folders i12213154654654646464646n different pc to synchronize."
.Replacement.Text = "driver kali linux para el adaptador usb alfa negro https://github.com/astsam/rtl8812au . ifi card on an virtualbox's ubuntu http://askubuntu.com/questions/28201...ualboxs-ubuntu two folders in different pc to synchronize."
.Forward = True
.Wrap = wdFindContinue
.Format = True
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
With Selection.Find
.Text = "I would like to know is FFS is able to sync when a file is moved or deleted from one of the folders without problem. s able to detect theses changes ? Or simple synchronize attending to the actual and present files and folders ?"
.Replacement.Text = "I would like to know is FFS is able to sync when a file is moved or deleted from one of the folders without problem. s able to detect theses changes ? Or simple synchronize attending to the actual and present files and folders ?"
.Forward = True
.Wrap = wdFindContinue
.Format = True
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
With Selection.Find
.Text = "Best Regards http://www.freefilesync.org/forum/viewtopic.php?f=2&t=4197*"
.Replacement.Text = "Best Regards http://www.freefilesync.org/forum/vi...hp?f=2&t=4197*"
.Forward = True
.Wrap = wdFindContinue
.Format = True
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
End Sub
|
|
#5
|
|||
|
|||
|
But the method consist using VBA code.
I was thinking about the possibility to do this from the find and replace word window. And using regular expressions there. I have installed too the VBA Find & Replace utility able to do replaces between different word documents. Uses a similar window to find and replace in word. With code is the only way to do this ? I will need a different code for each replace then .... ! |
|
#6
|
||||
|
||||
|
Cross-posted at: http://www.vbaexpress.com/forum/show...lace-Word-2010
For cross-posting etiquette, please read: http://www.excelguru.ca/content.php?184
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
|
#7
|
||||
|
||||
|
Quote:
You can, of course, copy the 'replace' expression to the clipboard, then use a wildcard Find/Replace expression with, for example: Find = driver kali linux para el adaptador usb*4197\* Replace = ^c The above assumes the final http string is not a hyperlink in the document.
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
|
#8
|
|||
|
|||
|
Sorry.
Best Regards |
|
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
How to insert paragraph character after every 500 characters?
|
aditya_bokade | Word VBA | 28 | 11-13-2021 10:48 PM |
Insert more than 500 characters on FormField Word by VBA
|
Jow | Word VBA | 4 | 09-15-2016 04:06 AM |
| VBA Word - Find Text Font Color - Insert New Text | jc491 | Word VBA | 2 | 01-04-2016 05:42 PM |
| Macro to insert WordArt characters | Jennifer Murphy | Word VBA | 1 | 02-25-2014 03:10 AM |
| Junk characters (box-like characters) in Word file | Sashikala | Word | 1 | 04-20-2010 02:03 PM |