PREVENTING FOREIGN STYLES COMING INTO WORD

P

Pedro

Hello Team,

I have created some templates for our staff to use and everything works very
well. None of the styles are auto update and they are based on "no other
style" which means I update each end every one individually if I need to.
Thats the way I want it.

What I can't do is prevent users from bringing in external styles when they
"cut & paste" stuff into the documents. Pretty soon the styles area looks
like a shambles with all sorts of styles that I have not created.

I'd like people to be able to paste text in, and despite me telling them to
convert their source to "TEXT ONLY" before pasting, they want to preserve
their original tables, drawings and other items, so they still manage to
inundate the styles panel with rubbish.

Any ideas on how to prevent external styles being pasted in.

Cheers

Peter
(e-mail address removed)
 
S

Stefan Blom

You can use the following macro in an add-in to intercept the paste command:

Sub EditPaste()
On Error Resume Next
Selection.PasteSpecial datatype:=wdPasteText
End Sub
 
R

Robert M. Franz (RMF)

Hello Pedro
I have created some templates for our staff to use and everything works very
well. None of the styles are auto update and they are based on "no other
style" which means I update each end every one individually if I need to.
Thats the way I want it.

What I can't do is prevent users from bringing in external styles when they
"cut & paste" stuff into the documents. Pretty soon the styles area looks
like a shambles with all sorts of styles that I have not created. [..]

depending on the version of Word, you can also restrict the formatting
to your selection of styles. This works pretty good (it's not
bullet-proof because Word itself may seldom create direct formatting on
the go), but nothing else can be set -- the users are even unable to use
direct formatting.

HTH
Robert
 
S

Stefan Blom

That's a good idea (which I overlooked). It is certainly more sophisticated
than pasting everything as unformatted text. :)

--
Stefan Blom
Microsoft Word MVP



Robert M. Franz (RMF) said:
Hello Pedro
I have created some templates for our staff to use and everything works
very well. None of the styles are auto update and they are based on "no
other style" which means I update each end every one individually if I
need to. Thats the way I want it.

What I can't do is prevent users from bringing in external styles when
they "cut & paste" stuff into the documents. Pretty soon the styles area
looks like a shambles with all sorts of styles that I have not created.
[..]

depending on the version of Word, you can also restrict the formatting to
your selection of styles. This works pretty good (it's not bullet-proof
because Word itself may seldom create direct formatting on the go), but
nothing else can be set -- the users are even unable to use direct
formatting.

HTH
Robert
--
/"\ ASCII Ribbon Campaign | MSFT |
\ / | MVP | Scientific Reports
X Against HTML | for | with Word?
/ \ in e-mail & news | Word | http://www.masteringword.eu/
 
R

Robert M. Franz (RMF)

Hello Stefan

Stefan said:
That's a good idea (which I overlooked). It is certainly more sophisticated
than pasting everything as unformatted text. :)

thanks. I guess I _have_ to look sideways sometimes since I'm not that
VBA-fluent ... :)

Greetinx
Robert
 

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