Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 07-15-2018, 03:20 AM
macropod's Avatar
macropod macropod is offline Convert particular blocks of text within a word document to tables using macro Windows 7 64bit Convert particular blocks of text within a word document to tables using macro Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 22,385
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

Your attachment has 'Command:' and 'Some text' on the same line, so it's unreasonable to expect the macro coded to deal with the document as supplied to put them on different rows when you didn't say that's what you wanted. Furthermore, your attachment has a non-breaking space between 'Command:' and 'Some text', just like the others, not the standard space you're now saying it has. To handle both scenarios, you could change:
.Text = ":[^s]{1,}"
to:
.Text = ":[ ^s]{1,}"
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
Reply

Tags
vba macro, word 2016



Similar Threads
Thread Thread Starter Forum Replies Last Post
Referencing text blocks from one document in several chrisr34000 Word 2 07-05-2017 03:17 PM
Convert particular blocks of text within a word document to tables using macro Convert all tables to text but ... bnyamin Word VBA 6 05-25-2017 12:15 AM
Convert particular blocks of text within a word document to tables using macro Convert Word Tables to PDF tcoggins Word Tables 2 06-29-2016 10:28 AM
Convert particular blocks of text within a word document to tables using macro Macro Needed To Convert Text in Word to Plain Text and Back to Word rsrasc Word VBA 5 12-18-2015 07:13 AM
Convert particular blocks of text within a word document to tables using macro convert text to tables oraenthu Word 8 03-17-2015 10:22 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 02:11 PM.


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