Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 03-04-2014, 04:07 AM
RoMu RoMu is offline Add Break at end of doc, control display of non-printable characters Windows 7 64bit Add Break at end of doc, control display of non-printable characters Office 2010 32bit
Novice
Add Break at end of doc, control display of non-printable characters
 
Join Date: Mar 2014
Posts: 6
RoMu is on a distinguished road
Default Add Break at end of doc, control display of non-printable characters

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
Reply With Quote
 

Tags
non-printing characters, page break, vba



Similar Threads
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
Add Break at end of doc, control display of non-printable characters How to display those characters in word properly? 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

Other Forums: Access Forums

All times are GMT -7. The time now is 12:32 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft