Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 05-01-2023, 09:38 PM
mdlewis mdlewis is offline VBA read Word Docx where "rec" delimiter is # Windows 7 64bit VBA read Word Docx where "rec" delimiter is # Office 2010
Novice
VBA read Word Docx where "rec" delimiter is #
 
Join Date: Jan 2019
Posts: 8
mdlewis is on a distinguished road
Default VBA read Word Docx where "rec" delimiter is #

I have a source Word document consisting of "logical" records. Each record block starts with a # (hash) character and finishes just before the next. There may be several paragraphs within. I want to slurp up, all of the text from a # mark to just before the next and move it into an access long text variable for further processing. This is a snippet of code. But I need a wraparound to select each paragraph. Can I be helped?



like:

For Each singleParagraph In ActiveDocument.XXX ********************

and continue

For Each singleLine In ActiveDocument.Paragraphs - replace to current paragraph

LineText = Trim(singleLine.Range.Text)

If Len(LineText) >= 32767 Then
Debug.Print Len(LineText)
' Stop
End If

If Left(LineText, 1) = "#" Then

'// parse the text here...
Reply With Quote
Reply



Similar Threads
Thread Thread Starter Forum Replies Last Post
Mailmerge macro: Trying to get rid of the "please select delimiter" dialog box vincenzo345 Word VBA 0 07-17-2019 12:21 PM
VBA read Word Docx where "rec" delimiter is # All MS Word Docs now "Read-Only"? MacMorrighan Word 1 07-11-2016 09:28 PM
Word document attached to email is opening as "Read Only" Jo Freeman Outlook 0 05-18-2016 02:49 AM
VBA read Word Docx where "rec" delimiter is # Batch instruction works or ".doc" in folder, but not ".docx" raymondroe Word VBA 4 02-15-2015 01:19 AM
VBA read Word Docx where "rec" delimiter is # Why the "day" is not inserted as we read values from Excel to Word? Jamal NUMAN Word 8 09-04-2011 07:48 AM

Other Forums: Access Forums

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