View Single Post
 
Old 06-08-2012, 12:59 PM
mawallace mawallace is offline Windows 7 64bit Office 2010 32bit
Novice
 
Join Date: Jun 2012
Posts: 6
mawallace is on a distinguished road
Default Problems with importing text and formatting lists

I have been playing with this for too long!!

I have two documents:-

Communications
charity services

I want to select the text from part of the charity services document, paster into communications, and then make the numbering line up. But it just does not work for me!

I have uploaded three files:-

Communions - Showing the document
Charity services - From which the text is being imported
Result -showing te result
Required result - showing what I am trying to achieve - ie the list and numbering going along fine!

Any idea where I am going wrong!

I am doing this as a macro as there a number of documents I need to send the paragraph too - depending on results - and I am testing this at the moment

Script as the macro is:-

Sub accounting()
'
' accounting Macro
'Dim myPath As String
myPath = ActiveDocument.Path & "\charity services.docx"
Set o = Word.Documents.Open(myPath, , , , , , , , , , , False) 'False means open test.doc 'INVISIBLE'

Set chk2 = o.Range(Start:=o.Bookmarks("acc").Range.Start, End:=o.Bookmarks("endacc").Range.Start)
chk2.Copy
Selection.GoTo What:=wdGoToBookmark, Name:="acc"
Selection.Paste



End Sub
Attached Files
File Type: docx required result.docx (32.5 KB, 9 views)
File Type: docx Communication.docx (27.4 KB, 10 views)
File Type: docx charity services.docx (24.1 KB, 10 views)
Reply With Quote