As an Amazon associate we earn from qualifying purchases. Thanks for your support!                               
×

Best Blu-ray Movie Deals


Best Blu-ray Movie Deals, See All the Deals »
Top deals | New deals  
 All countries United States United Kingdom Canada Germany France Spain Italy Australia Netherlands Japan Mexico
The Sound of Music 4K (Blu-ray)
$37.99
2 hrs ago
Outland 4K (Blu-ray)
$38.02
4 hrs ago
Creepshow 2 4K (Blu-ray)
$32.99
2 hrs ago
Peanuts: Ultimate TV Specials Collection (Blu-ray)
$72.99
12 hrs ago
Silverado 4K (Blu-ray)
$36.99
6 hrs ago
Spawn 4K (Blu-ray)
$31.99
13 hrs ago
Re-Animator 4K (Blu-ray)
$38.02
8 hrs ago
A Nightmare on Elm Street Collection 4K (Blu-ray)
$96.99
12 hrs ago
Back to the Future 4K (Blu-ray)
$33.99
13 hrs ago
Dan Curtis' Late-Night Mysteries (Blu-ray)
$20.99
8 hrs ago
Shudder: A Decade of Fearless Horror (Blu-ray)
$80.68
6 hrs ago
The Walking Dead: Dead City - Season Two (Blu-ray)
$18.99
6 hrs ago
What's your next favorite movie?
Join our movie community to find out


Image from: Life of Pi (2012)

Go Back   Blu-ray Forum > Entertainment > General Chat
Register FAQ Community Calendar Today's Posts Search


 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Old 07-24-2013, 02:38 PM   #1
kpkelley kpkelley is offline
Blu-ray Ninja
 
kpkelley's Avatar
 
Aug 2007
Framingham, MA
385
2478
113
152
Default Word Macro Help

Hi,

I have some reports that are saved as text files and need to be formatted before I can print them. I have been able to record a macro that will format the whole file correctly with one exception. The Page Breaks are off. I can write a macro that will insert page breaks where I need them, but I don't know how to repeat it and then end the loop at the end of the document.

Here is what I have so far:
Quote:
Sub PageBreak()
'
' PageBreak Macro
'
'
Selection.find.ClearFormatting
With Selection.find
.Text = "run date"
.Replacement.Text = ""
.Forward = True
.Wrap = wdFindContinue
.Format = False
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Do
Selection.find.Execute
Selection.find.Execute
Selection.MoveLeft Unit:=wdCharacter, Count:=1
Selection.MoveUp Unit:=wdLine, Count:=1
Selection.InsertBreak Type:=wdPageBreak
Loop
End Sub
TIA,

Kyle.
  Reply With Quote
 
Go Back   Blu-ray Forum > Entertainment > General Chat



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 09:18 PM.