![]() |
|
#2
|
||||
|
||||
|
The problem is that you are pasting the items after the range and then formatting the range. Without your workbook it is impossible to check, but the following should be closer:
Code:
For i = 6 To Sheets.Count
range2.Collapse direction:=0
range2.Style = "kop 2"
Worksheets(i).Range("AU20").Copy
Application.Wait (Now + TimeValue("0:00:01"))
range2.PasteSpecial Placement:=0, DataType:=2
appwd.ActiveDocument.Range.InsertParagraphAfter
range2.End = appwd.ActiveDocument.Range.End
range2.Paragraphs(1).Style = "kop 2"
Application.CutCopyMode = False
'copy paste acties
For j = 1 To 6
range2.Collapse direction:=0
Worksheets(i).Range(bereik(j)).Copy
Application.Wait (Now + TimeValue("0:00:01"))
range2.PasteSpecial Placement:=0, DataType:=3
appwd.ActiveDocument.Range.InsertParagraphAfter
range2.End = appwd.ActiveDocument.Range.End
range2.Paragraphs(1).Style = "standaard"
Application.CutCopyMode = False
Next j
Next i
__________________
Graham Mayor - MS MVP (Word) (2002-2019) Visit my web site for more programming tips and ready made processes www.gmayor.com |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
Underline Inserted Text
|
jmltinc | Word VBA | 9 | 02-08-2017 08:10 AM |
| align text when textbox inserted later | ketanco | Word | 1 | 06-19-2016 01:21 PM |
Is there a way of having text automatically inserted based on the selection of other text?
|
MiniMum97 | Word | 2 | 04-12-2016 06:09 AM |
| Text disappears (but headings and text boxes ok) when printing 1 page of a document | msfordummies | Word | 1 | 02-21-2013 10:28 PM |
| Automatic text on inserted slides | tom_kladno | PowerPoint | 0 | 05-12-2011 04:30 AM |