Mobile menu

A macro to divide one Word doc into smaller docs of 5 pages each
Thread poster: Smith Park

Smith Park  Identity Verified
South Korea
Local time: 08:24
Member (2005)
English to Korean
Dec 25, 2002

This macro divides the .doc into several small .docs.

Each of them is consist of five pages of the original .doc.



made by youtrans@gmail.com







Sub MyPages()

Dim i, n, TotalPages As Integer

Dim fname As String

TotalPages = Selection.Information(wdNumberOfPagesInDocument)

n = 1

For i = 1 To (TotalPages / 5)



Selection.GoTo What:=wdGoToPage, Which:=wdGoToFirst, Count:=6, Name:=\"\"

Selection.Find.ClearFormatting

With Selection.Find

.Text = \"\"

.Replacement.Text = \"\"

.Forward = True

.Wrap = wdFindContinue

.Format = False

.MatchCase = False

.MatchWholeWord = False

.MatchByte = False

.CorrectHangulEndings = True

.MatchWildcards = False

.MatchSoundsLike = False

.MatchAllWordForms = False

End With

Selection.HomeKey Unit:=wdStory, Extend:=wdExtend

Selection.Cut

Documents.Add

Selection.Paste

fname = Str(n) + \"-\" + Str(n + 4)

ActiveDocument.SaveAs filename:=fname, _

FileFormat:=wdFormatDocument, LockComments:=False, Password:=\"\", _

AddToRecentFiles:=False, WritePassword:=\"\", ReadOnlyRecommended:=False, _

EmbedTrueTypeFonts:=False, SaveNativePictureFormat:=False, SaveFormsData _

:=False, SaveAsAOCELetter:=False

ActiveDocument.Close

n = n + 5

Next i

End Sub



[Edited at 2005-12-03 04:16]


Direct link Reply with quote
 

Michael Bastin  Identity Verified
Local time: 00:54
English to French
+ ...
great Dec 26, 2002

Hi,



This Macro is really helpful, certainly for large files you have to split between translators.



However, I have a newbie question... How/where do you create this macro.



I go in Word > Tools > Macro and then I am a bit lost as to what to choose. Visual Basic or Microsoft editor.



Any help to use this macro would be welcome.



Thank you


Direct link Reply with quote
 

Smith Park  Identity Verified
South Korea
Local time: 08:24
Member (2005)
English to Korean
TOPIC STARTER
Dec 30, 2002



[Edited at 2004-05-18 00:13]


Direct link Reply with quote
 

Smith Park  Identity Verified
South Korea
Local time: 08:24
Member (2005)
English to Korean
TOPIC STARTER
Thank you! Dec 30, 2002

In Word, press Alt + F11, the Visual Basic Editor will open.

Good luck and have fun with it!

Thank you again.

yhpark.


Direct link Reply with quote
 


To report site rules violations or get help, contact a site moderator:


You can also contact site staff by submitting a support request »

A macro to divide one Word doc into smaller docs of 5 pages each

Advanced search






Protemos translation business management system
Create your account in minutes, and start working! 3-month trial for agencies, and free for freelancers!

The system lets you keep client/vendor database, with contacts and rates, manage projects and assign jobs to vendors, issue invoices, track payments, store and manage project files, generate business reports on turnover profit per client/manager etc.

More info »
PerfectIt consistency checker
Faster Checking, Greater Accuracy

PerfectIt helps deliver error-free documents. It improves consistency, ensures quality and helps to enforce style guides. It’s a powerful tool for pro users, and comes with the assurance of a 30-day money back guarantee.

More info »



All of ProZ.com
  • All of ProZ.com
  • Term search
  • Jobs