#1
|
|||
|
|||
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... |
|
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 |
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 |
Batch instruction works or ".doc" in folder, but not ".docx" | raymondroe | Word VBA | 4 | 02-15-2015 01:19 AM |
Why the "day" is not inserted as we read values from Excel to Word? | Jamal NUMAN | Word | 8 | 09-04-2011 07:48 AM |