A
A
andruxin2011-05-05 10:12:47
.NET
andruxin, 2011-05-05 10:12:47

Array of MS Word document fragments?

doing so

Dim MyDataObj(2) As Object<br/>
 Set actDoc = ActiveWindow<br/>
 Set ddc2 = Documents.Open(&quot;C:\1.doc&quot;) ', Visible:=False<br/>
 Set secDoc = ddc2.ActiveWindow<br/>
 secDoc.Selection.GoTo What:=wdGoToBookmark, Name:=&quot;fakt5&quot;<br/>
 Set MyDataObj(0) = secDoc.Selection<br/>
 secDoc.Selection.GoTo What:=wdGoToBookmark, Name:=&quot;fakt6&quot;<br/>
 Set MyDataObj(1) = secDoc.Selection<br/>
 actDoc.Activate<br/>
 actDoc.Selection = MyDataObj(1)<br/>
 ddc2.Close

the point is to make an array of pieces of document text that contains tables with formatting. and then insert the selected elements of the array. and in this option only text is inserted. no matter how I figure out what types of data are created where.

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question