View Single Post
 
Old 04-30-2021, 11:43 AM
Rolo18 Rolo18 is offline Windows 10 Office 2016
Novice
 
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