Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #2  
Old 03-12-2019, 03:19 PM
macropod's Avatar
macropod macropod is offline Need macro for XML tagging in word doc Windows 7 64bit Need macro for XML tagging in word doc Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 22,467
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

A trivial challenge:
Code:
Sub Demo()
Application.ScreenUpdating = False
Dim Para As Paragraph
For Each Para In ActiveDocument.Paragraphs
  With Para.Range
    .Characters.First.InsertBefore "<" & .Style & ">"
    .Characters.Last.InsertBefore "</" & .Style & ">"
  End With
Next
Application.ScreenUpdating = True
End Sub
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
 

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
Macro to transfer data from Word to another Word document with bookmark Jovan Yong Word VBA 3 04-17-2018 04:27 AM
Macro to put 1 word of a MS Word file in 1 cell of a Word or Excel Table Singh_Edm Word VBA 6 11-13-2015 08:48 PM
Need macro for XML tagging in word doc Macro Question: Need help making a macro to highlight the first word in every sentence LadyAna Word 1 12-06-2014 10:39 PM
Need macro for XML tagging in word doc Word 2003 Macro problem running in Word 2010 norwood Word VBA 2 02-03-2014 06:49 PM
Macro for tagging and rearranging selected text for revision caotico Word VBA 0 03-28-2012 06:35 PM

Other Forums: Access Forums

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