I've got a table in Word with a cell with a few short lines in. I want to copy the contents of that cell into a .txt file, maintining the line breaks.
Currently the line breaks are lost: Contents of Word table cell:
Alice
Bob
Contents of VBA String:
AliceBob
Code sample to get string:
MyString = ActiveDocument.Tables(a).Cell(1, 1).Range.Text
I solved my problem by using copy & paste into a new word document, then saving the new document as a text file. Not neat or tidy, but effective enough for the situation.