![]() |
#1
|
|||
|
|||
![]()
Hello all,
using Office 2010, I have written a macro in VBA, which copies the table on first page (table is smaller than the page itself) to the second page. The first table is being selected and copied by using the following commands (the macro is in Excel, controlling the Word application). With appWord.ActiveDocument.Tables(1) .Select End With appWord.Selection.Copy appWord.Selection.EndKey Unit:=wdStory appWord.Selection.InsertBreak Type:=wdSectionBreakNextPage appWord.Selection.Paste This works fine as long as the display of non-printing characters in Word is switched on. If this option is switched off, the break to the next page does not happen. In that case the pasted table splits between page one and two. 1. Is there a better way to make sure that the insertion of the break succeeds ? 2. Is there a way to switch the display of non-printing characters in Word on/off through VBA ? Thanks Rolf |
Tags |
non-printing characters, page break, vba |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
how to make building block content control determine bb to display elsewhere | jamles12 | Word VBA | 5 | 11-16-2013 11:38 AM |
display number of characters in a word section | shootingluc | Word | 3 | 03-29-2012 03:25 PM |
![]() |
Srivas | Word | 2 | 03-28-2011 12:02 AM |
paragaph hard break, soft break and ...strange break | czomberzdaniela | Word | 2 | 12-03-2010 06:58 PM |
Junk characters (box-like characters) in Word file | Sashikala | Word | 1 | 04-20-2010 02:03 PM |