Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 06-30-2020, 12:47 PM
Rolo18 Rolo18 is offline Replacing/Removing XML file lines Windows 10 Replacing/Removing XML file lines Office 2016
Novice
Replacing/Removing XML file lines
 
Join Date: Mar 2020
Posts: 20
Rolo18 is on a distinguished road
Default Replacing/Removing XML file lines

Hi all,




I'm pretty new at writing scripts. But I'm having a hard time figuring out how to write a simple Macro in VBA to allow multiple xml files to be edited and saved by either removing or replacing a certain text.



For instance I need to delete, from multiple XML files, <!ENTITY % ISOEntities PUBLIC "ISO 8879-1986//ENTITIES... etc


the other thing is I need to replace "&deg" to "°deg" within the same XML files.


Thank you for any help.
Reply With Quote
  #2  
Old 07-01-2020, 04:55 PM
Guessed's Avatar
Guessed Guessed is offline Replacing/Removing XML file lines Windows 10 Replacing/Removing XML file lines Office 2016
Expert
 
Join Date: Mar 2010
Location: Canberra/Melbourne Australia
Posts: 3,969
Guessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant future
Default

This is a relatively straightforward question and similar questions have been asked before so we aren't going to re-invent the wheel for you. Do a search for 'Batch find replace' and you will see lots of threads with code. A few minor changes will allow those macros to work on your specific requirements.

If you get stuck, post back here with a description of your sticking point, the code you are using and include a link to the original thread where you got it from.
__________________
Andrew Lockton
Chrysalis Design, Melbourne Australia
Reply With Quote
  #3  
Old 07-01-2020, 05:07 PM
Guessed's Avatar
Guessed Guessed is offline Replacing/Removing XML file lines Windows 10 Replacing/Removing XML file lines Office 2016
Expert
 
Join Date: Mar 2010
Location: Canberra/Melbourne Australia
Posts: 3,969
Guessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant future
Default

Here is one such thread to get you started
https://www.msofficeforums.com/word-...ocx-files.html
__________________
Andrew Lockton
Chrysalis Design, Melbourne Australia
Reply With Quote
Reply



Similar Threads
Thread Thread Starter Forum Replies Last Post
Replacing/Removing XML file lines Replacing horizontal lines eosrose Word VBA 2 06-16-2023 11:58 PM
Replacing/Removing XML file lines Removing Lines / Tables with Blank Data Crosby87 Mail Merge 33 07-16-2019 02:24 AM
Replacing/Removing XML file lines Removing indentations at beginning of paragraphs and replacing with line spaces captainamerica Word 2 10-27-2017 05:32 PM
Replacing/Removing XML file lines Replacing jpg file in each file of a directory hklein Word VBA 4 10-14-2013 04:40 PM
Urgent help needed with removing blank lines... iammom2four Outlook 0 12-15-2010 06:12 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 03:06 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