Get all text of a Word document into an array separated by a newline

I want to get the text of a text document into a variable and want to split a string into an array with a new string as a separator. How can i do this?

Dim str
str = ActiveDocument.?  
+5
source share
1 answer

Is this a doc file or a txt file?

something like this should work

Sub Test()
Dim arr() As String
arr = Split(ActiveDocument.Content.Text, Chr(13))
End Sub
+8
source

All Articles