Save current Tab settings

A

Andy

If I've set some tabs for a paragraph and then decide to change the
paragraph style, of course my directly applied tabs vanish. If I
don't want to manually reset the tabs, my kludge is to record a macro
before I change the style, opening and closing the tab dialog. Then
I apply the new paragraph style, run the macro, and then delete the
macro (unless I want to save those particular tab settings).

What would the code be to save the current tab settings (in
variables?), which I could store in one macro (Pushtabs), and the code
to then apply those settings to the current paragraph which I could
store in another macro (Poptabs)?

TIA,

Andy
 
W

Word Heretic

G'day Andy <[email protected]>,

Why not define the tab stops for each style and forget it for ever?


Steve Hudson - Word Heretic

steve from wordheretic.com (Email replies require payment)
Without prejudice


Andy reckoned:
 
A

Andy

Hi Steve,

I might turn the new paragraph into a style if I'm going to use that
format for more than one or two paragraphs, but I still have to set
the tabs.

Say I start with a BT paragraph (which has no tabs set), get the
combination of tabs set up how I want them (6 tabs: a right, a left,
and the rest decimal). Then I decide I really should have started
with a SUB paragraph (again, no tabs) and set the tabs for that. I'm
trying to avoid re-doing the tab settings.

In either case I might decide to use the paragraph to create a BT-TAB6
or a SUB-TAB6 style.

Andy
 
W

Word Heretic

G'day Andy <[email protected]>,

If possible, then yes, that is the best way to go

MyNoTabsPara
MyTabbedPara

or whatever.

You could also write a macro to make copies of all base styles with
tabs in them, with -TAB as the style name suffix.

Steve Hudson - Word Heretic

steve from wordheretic.com (Email replies require payment)
Without prejudice


Andy reckoned:
 
A

Andy

So Steve, back to my original question, needing some code to save the
current paragraph's tab settings, and some more code to apply those
settings to another paragraph after I've moved to it.

Any ideas?


Thanks,

Andy
 
W

Word Heretic

G'day Andy <[email protected]>,

is this still an issue?

Steve Hudson - Word Heretic

steve from wordheretic.com (Email replies require payment)
Without prejudice


Andy reckoned:
 
A

Andy

Hi Steve,

Thanks for asking. It's not a huge issue, since I turned my workaround
(record a quickie macro opening and closing the tab dialog, and then
play it back when I want to apply the tab settings) into a SendKeys
macro:

Sub PushTabs()

SendKeys "%t"
SendKeys "m"
SendKeys "r"
SendKeys "PopTabs"
SendKeys "~"
SendKeys "y"
SendKeys "%o"
SendKeys "t"
SendKeys "~"
SendKeys "%t"
SendKeys "m"
SendKeys "r"

End Sub


But it's not very elegant. For one thing it changes the PopTabs
macro, so Word asks if I want to save normal.dot when I exit.

I'd still like a real PushTabSettings macro and a PopTabSettings
macro, partly just to see how it would be done using variables and not
triggering the "changes have been made to normal.dot" dialog.

Andy
 
W

Word Heretic

G'day Andy <[email protected]>,

To record the tabstops, iterate MyParagraph.TabStops(n).blah

Then use TabStops.Add to add them.

Steve Hudson - Word Heretic

steve from wordheretic.com (Email replies require payment)
Without prejudice


Andy reckoned:
 
A

Andy

To record the tabstops, iterate MyParagraph.TabStops(n).blah
Then use TabStops.Add to add them.

Thanks Steve, I'll have to fool with this when I get caught up.


Andy
 

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