Style Details Macro Needed

K

Krumrei

I need to build a macro that allows me to find out all the details on all the
styles within a .DOT

I have say 30 of the styles that I want to modify in one document and cannot
get the copy function of the styles to work, so I am just building a Macro
that modifies the exsisting document to add and modify the new styles I want
to apply. Trouble is, I dont want to go through each style from the template
to create in the new document.
 
G

Graham Mayor

If you have the styles in a document, delete the document content and save
the document as a template. You will then have a template containing the
styles.

--
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
Graham Mayor - Word MVP


<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
 
K

Krumrei

What I am trying to do is know the details of each style, so that I can write
a macro of those details into a new document along with other changes to an
exsisting document.

The issue is, I tried to do an import, but because the document resides on a
sharepoint server and to import it, you have to write a save function, it
will not save it to the server.

Since I have thousands of documents to change, it would be easier to just
write the macro of the new styles and modified styles in the macro.

I just didnt want to write each detail out by hand.
 
G

Graham Mayor

If your documents have used styles and you want to modify those styles then
simply attach the template that you have created that has those styles, with
the update option set. eg

With ActiveDocument
.UpdateStylesOnOpen = True
.AttachedTemplate = "D:\Word Templates\Sample Style.dot"
End With

The similarly named styles in the document will be updated to match the
template, and you can do that in a batch process.

If your documents do not make proper use of styles I really don't see how
you will be able to modify the documents using a macro in the manner you
describe. How will your macro know which formatting to apply where?

--
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
Graham Mayor - Word MVP


<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
 

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