Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 08-04-2021, 05:59 PM
Rolo18 Rolo18 is offline Macro to count and add specific XML tag Windows 10 Macro to count and add specific XML tag Office 2016
Novice
Macro to count and add specific XML tag
 
Join Date: Mar 2020
Posts: 20
Rolo18 is on a distinguished road
Default Macro to count and add specific XML tag

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
Reply

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
Looking for a macro for word count in one specific column of table, only rows with white background mobj Word VBA 2 10-17-2019 03:09 AM
How to count unique names appeared on specific date for daily report? specky_ Excel 5 02-19-2019 02:26 AM
Count Duplicate Values without a specific Unique Value Brittni Excel 1 02-01-2017 06:22 PM
Macro to count and add specific XML tag How do you count how often a specific value occurs in single changing cell? blackjack Excel 12 09-03-2014 10:41 AM
How to count year lapse (rounded off) based on specific date KIM SOLIS Excel 1 11-01-2011 10:50 AM

Other Forums: Access Forums

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