Free Support Forum -

Array Of Documents

I wish to store an array of Word documents, and then combine them all at once after they are in the array. I already know how to do the combining, but not sure of the most efficient array type (hashtable, etc...) to store the Word docs in? Do you have sample code in



Thanks for your request. Try to use the following code.

Dim arr As String() = Directory.GetFiles("files")

Dim i As Integer = 0

Dim doc As Document = New Document(arr(0))

For i = 1 To arr.Length - 1

Dim doc1 As Document = New Document(arr(i))

InsertDocument(doc.LastSection.Body.LastParagraph, doc1)



The InsertDocument method you can find here.

I hope that it will help you.

Best regards,