Make it fit

J

Jeff

Is there a vba subroutine to mimic Wordperfects make it fir for a
section of a document?
 
J

Jezebel

Not being familiar with WordPerfect makes that quesiton hard to answer.
Presumably mimicry of WordPerfect is not your ultimate objective. What are
you actually trying to do?
 
J

Jeff

From the web:


WP can shrink ANY size document to the specific number of pages,
giving YOU the option of what to reduce, e.g., Font, Spacing, Margins,
etc. Additionally, only WP gives you the option of 'Block Make It
Fit', which lets you adjust a specific number of pages within your
document.

I read some where that Word can reduce your document by 1 page, and
you have no say in what it will change to make it fit but I have been
unable to find this feature.
 
J

Jezebel

No idea what the Word feature is that you've read about.

It does have features that can be used to control the size of a document or
some part of it; but you need to put WP out of your mind for the moment and
tell us what you're trying to achieve: Reduce the size of your document by
one page? Reduce a section of document to x column centimetres?
 
J

Jeff

Ideally I would like to highlight a block of text (say a page and 1/2
pages worth of text ) and have the VBA macro reduce the Font, Spacing,
Margins so that it will fit into one page


If that is to difficult then have it take the whole document and
reduce it by one page by reduce the Font, Spacing, Margins etc.
 
J

Jay Freedman

The Word feature is a button on the toolbar in the Print Preview. It
works only by reducing font sizes, and it's suitable mainly for
shrinking a memo or letter that's a few lines too long. It certainly
isn't fine typography.

That and some other copy-fitting suggestions are at
http://www.word.mvps.org/FAQs/Formatting/FitCopy.htm.

There's nothing built into Word that works the way you described. It
would certainly be possible to write a macro to do it, and someone may
have already dones so, but I'm not aware of it. You could check in at
http://www.editorium.com to see if they have anything like it.
 
J

Jeff

Thanks but both were a dead end. ere is a sample of code I started
playing around with in case you are interested but it is real rough
and really does not yet check if I went to far with any one parameter.
Also i am not sure when to start rduceing the font or word spacing

Sub Reduce()
TtlPgsOriginal = Selection.Information(wdNumberOfPagesInDocument)
If TtlPgsOriginal <= 1 Then
MsgBox "Document Too Small"
End If
TtlPgsGoal = TtlPgsOriginal - 1
For i = 1 To 50
ActiveDocument.PageSetup.LeftMargin =
ActiveDocument.PageSetup.LeftMargin - (0.1 *
ActiveDocument.PageSetup.LeftMargin)
ActiveDocument.PageSetup.RightMargin =
ActiveDocument.PageSetup.RightMargin - (0.1 *
ActiveDocument.PageSetup.RightMargin)
ActiveDocument.PageSetup.TopMargin =
ActiveDocument.PageSetup.TopMargin - (0.1 *
ActiveDocument.PageSetup.TopMargin)
ActiveDocument.PageSetup.BottomMargin =
ActiveDocument.PageSetup.BottomMargin - (0.1 *
ActiveDocument.PageSetup.BottomMargin)
TtlPgs = Selection.Information(wdNumberOfPagesInDocument)
'If i Mod 5 = 0 Then
For j = 1 To ActiveDocument.Paragraphs.Count
ActiveDocument.Paragraphs(j).Range.Font.Size =
ActiveDocument.Paragraphs(1).Range.Font.Size - 0.1
ActiveDocument.Paragraphs(j).LineSpacing =
ActiveDocument.Paragraphs(j).LineSpacing - 0.01
Next j
'End If
If TtlPgs = TtlPgsGoal Then End
Next i
End Sub
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top