Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 03-15-2017, 04:47 AM
Esgrimidor Esgrimidor is offline Insert text longer 254 characters in word Windows XP Insert text longer 254 characters in word Office XP
Advanced Beginner
Insert text longer 254 characters in word
 
Join Date: Jun 2009
Posts: 35
Esgrimidor is on a distinguished road
Default Insert text longer 254 characters in word

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
Reply With Quote
  #2  
Old 03-15-2017, 05:28 AM
macropod's Avatar
macropod macropod is online now Insert text longer 254 characters in word Windows 7 64bit Insert text longer 254 characters in word Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 21,956
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

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]
Reply With Quote
  #3  
Old 03-15-2017, 05:49 AM
Esgrimidor Esgrimidor is offline Insert text longer 254 characters in word Windows XP Insert text longer 254 characters in word Office XP
Advanced Beginner
Insert text longer 254 characters in word
 
Join Date: Jun 2009
Posts: 35
Esgrimidor is on a distinguished road
Default

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
Reply With Quote
  #4  
Old 03-15-2017, 08:03 AM
dwirony dwirony is offline Insert text longer 254 characters in word Windows 7 64bit Insert text longer 254 characters in word Office 2003
Advanced Beginner
 
Join Date: Oct 2016
Posts: 49
dwirony will become famous soon enough
Default

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
Of course, my solution is rather clunky. I'm sure Paul could provide you with a much cleaner version...
Reply With Quote
  #5  
Old 03-15-2017, 12:44 PM
Esgrimidor Esgrimidor is offline Insert text longer 254 characters in word Windows XP Insert text longer 254 characters in word Office XP
Advanced Beginner
Insert text longer 254 characters in word
 
Join Date: Jun 2009
Posts: 35
Esgrimidor is on a distinguished road
Default

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 .... !
Reply With Quote
  #6  
Old 03-15-2017, 08:28 PM
macropod's Avatar
macropod macropod is online now Insert text longer 254 characters in word Windows 7 64bit Insert text longer 254 characters in word Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 21,956
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

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]
Reply With Quote
  #7  
Old 03-15-2017, 08:37 PM
macropod's Avatar
macropod macropod is online now Insert text longer 254 characters in word Windows 7 64bit Insert text longer 254 characters in word Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 21,956
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

Quote:
Originally Posted by Esgrimidor View Post
But the method consist using VBA code.
I was thinking about the possibility to do this from the find and replace word window.
So why did you post in the VBA forum if you really want to do it through the GUI?

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]
Reply With Quote
  #8  
Old 03-16-2017, 01:02 PM
Esgrimidor Esgrimidor is offline Insert text longer 254 characters in word Windows XP Insert text longer 254 characters in word Office XP
Advanced Beginner
Insert text longer 254 characters in word
 
Join Date: Jun 2009
Posts: 35
Esgrimidor is on a distinguished road
Default

Sorry.

Best Regards
Reply With Quote
Reply

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
Insert text longer 254 characters in word How to insert paragraph character after every 500 characters? aditya_bokade Word VBA 28 11-13-2021 10:48 PM
Insert text longer 254 characters in word 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

Other Forums: Access Forums

All times are GMT -7. The time now is 06:33 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2024 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft