Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 04-30-2021, 11:43 AM
Rolo18 Rolo18 is offline VBA find replace within a line break Windows 10 VBA find replace within a line break Office 2016
Novice
VBA find replace within a line break
 
Join Date: Mar 2020
Posts: 20
Rolo18 is on a distinguished road
Default VBA find replace within a line break

Hello everyone,
I am currently trying to modify my find and replace macro in order for it to read a line break.
For example: I am trying to replace the following. Here is part of my code.
Code:
    
    Dim changedXml As String

    changedXml = Replace(strXml, "</graphic></figure></foldout>", "reproductionWidth=*+1")
As you can see I'm trying to replace, </graphic></figure></foldout>, with reproductionWidth=*+1
The only issue is the macro doesn't replace it because on my XML files they have line breaks between each one so it's making my macro not read them so nothing gets changed.



This is how they look on my XML file:
</graphic>
</figure>
</foldout>

Does anyone know a solution to my problem?
Thank you for any help in advance.

Last edited by Rolo18; 04-30-2021 at 05:31 PM.
Reply With Quote
 

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
VBA find replace within a line break Find and Replace not capturing entire line Steve Kunkel Word VBA 7 04-22-2021 10:00 AM
VBA find replace within a line break Find and Replace Line Spacing farisca Word 2 06-18-2020 04:02 PM
VBA find replace within a line break Find / Replace hard Carriage Return with Line break. GreenBoy Word 2 03-11-2018 02:32 AM
Interchange line break and paragraph break shortcut keys skan Word 2 01-20-2017 03:50 AM
VBA find replace within a line break Bad view when using Find and Find & Replace - Word places found string on top line paulkaye Word 4 12-06-2011 11:05 PM

Other Forums: Access Forums

All times are GMT -7. The time now is 09:57 AM.


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