PDA

View Full Version : HELP : MACRO AUTOMATICALLY HYPHENS NEW PARAGRAPH AND EACH LAST SENTENCES



susanto
12-26-2013, 03:03 AM
hi expert..

i hope you would help me to figure it out about ms word problem with vba/macro or anything,cause i have almost 50 pages and manually press hyphens keyboard to fulfill..

see this below :

LAYOUT (SAMPLE RAW):
Theproposal for stock split would be brought to an extraordinary meeting of thecompany’s shareholders in April or May for approval, Astra InternationalCorporate Secretary Gita Tiffany Boer said during a public expose here onTuesday. By splitting the shares, retail investors could afford to buy them andthe company could increase the liquidity of its shares in the stock exchange,he said.

etc,..

AFTER MACRO
-----The proposal for stock split would be brought to an extraordinary meeting of the company’s shareholders in April or May for approval, Astra International Corporate Secretary Gita Tiffany Boer said during a public expose here on Tuesday. By splitting the shares, retail investors could afford to buy them and the company could increase the liquidity of its shares in the stock exchange, he said. -------------------------------------------------------------------

etc.,

how can/make automatically hyphens line at new paragraph and each the last sentences...

for your helping, thanks in advance...

susanto

macropod
12-26-2013, 03:25 AM
You could use an ordinary Find/Replace, where:
Find = ^p
Replace = -------------------------------------------------------------------^p-----

susanto
12-26-2013, 03:40 AM
thanks macropod, but not fully working...

i means, for new paragraph not work, and for last sentences should be fully full hyphens (alignment justified), i am using office 2007...

any ideas??

macropod
12-27-2013, 03:59 AM
for new paragraph not work
Please explain. As provided, the expression puts '-----' before every paragraph's text except the first.

for last sentences should be fully full hyphens (alignment justified)
That really isn't possible, because there is no way to ensure any given number of hyphens will have the same width as the remaining line width. What you should consider is using a right-aligned tab-stop with a tab formatted as strike-through at the end of every paragraph. The appropriate way to add the tab-stops is by modifying the paragraph Styles. The strike-through tabs can be inserted via Find/Replace.