You might want to look up the "Activewindow" object in VBE help.
Alternatively create an object that points to the document you want to work
on, rather than the "Activedocument" for instance,
Dim objDoc as document
Set objDoc = Documents.Add 'additional parameters if necessary
With objDoc
'work magic here
end With
> You might want to look up the "Activewindow" object in VBE help.
> Alternatively create an object that points to the document you want to work
[quoted text clipped - 6 lines]
> With objDoc
> 'work magic here
-snip-
Thanks Chuck,
I'll give it a try. My document is actually a scratch buffer -- the macro
formatted text gets picked up and pasted into another document manually. I
assume that 'work magic here is where I nestle my macro. I have some
limited experience and skills with programming, and I would like to keep it
that way. I can tweak a simple line or two, but to learn VBE proper is too
great a learning curve for my simple needs. I love the macro record function,
needless to say. Usually, with a little reverse engineering, I can make minor
fixes. But this one stumped me.
Lenny
schafer - 12 Jul 2005 05:58 GMT
This did it! Thanks, Chuck.
> > You might want to look up the "Activewindow" object in VBE help.
> > Alternatively create an object that points to the document you want to work
[quoted text clipped - 18 lines]
> fixes. But this one stumped me.
> Lenny