Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 08-03-2021, 11:37 PM
Rolo18 Rolo18 is offline VBA Macro to add numbering to XML tags Windows 10 VBA Macro to add numbering to XML tags Office 2016
Novice
VBA Macro to add numbering to XML tags
 
Join Date: Mar 2020
Posts: 20
Rolo18 is on a distinguished road
Default VBA Macro to add numbering to XML tags

Hello,


I’ve been looking but haven’t found a solution yet.
If anyone can guide me to a solution or has a solution it would be greatly appreciated.

I need a macro to select a certain file path with a lot of XML files and modify them all at once by creating a loop to add and differentiate certain XML opening tags.
For example the before XML file would have tags like this.

<table> Certain information here…
</table>
<table> Certain information here…
</table>
<table> Certain information here…
</table>

I need the macro to change it to this:

<table id=“TAB0001”> Certain information here…
</table>
<table id=“TAB0002”> Certain information here…
</table>
<table id=“TAB0003”> Certain information here…
</table>
<table id=“TAB0004”> Certain information here…
</table>

When it gets to the 10th table if it could remove a 0 instead of adding one.
For example it would be

<table id=“TAB0010”> Certain information here…
</table>

Etc…
Any help would be great. Thank you in advance.
Reply With Quote
  #2  
Old 08-08-2021, 10:44 PM
Guessed's Avatar
Guessed Guessed is offline VBA Macro to add numbering to XML tags Windows 10 VBA Macro to add numbering to XML tags 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

Is there a reason you posted this request to the Excel Programming forum? Do you want to run this code from Excel?
__________________
Andrew Lockton
Chrysalis Design, Melbourne Australia
Reply With Quote
Reply



Similar Threads
Thread Thread Starter Forum Replies Last Post
VBA macro to change author name in tagged comments, then delete the tags mjt Word VBA 0 01-28-2021 08:48 AM
Page Numbering Macro mbr50 Word VBA 4 01-20-2020 04:47 PM
Create a macro or Find/Replace Code to delete tags bonzai217 Word 2 08-04-2019 08:36 AM
VBA Macro to add numbering to XML tags Word macro to change style between tags superxl Word VBA 1 05-15-2016 03:17 PM
Automated "Macro" to delete Tags/Anchors field3 Word VBA 0 02-25-2009 02:53 PM

Other Forums: Access Forums

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