Reply
 
Thread Tools Display Modes
  #1   Report Post  
Posted to microsoft.public.word.docmanagement
Markc
 
Posts: n/a
Default macro to unprotect / protect sheet in word

Can anyne help, I have a macro in a word document that is used to create
extra copies(different page headers), when the sheet is protected(only
certain cells are completed by the user) the marco will not run..how can i
get round this.
current macro-

Sub ADVICENOTE()
'
' ADVICENOTE Macro
' Macro recorded 22/03/2006 by mchallacombe
'

Selection.WholeStory
Selection.Copy
Selection.MoveDown Unit:=wdLine, Count:=1
Selection.TypeParagraph
Selection.InsertBreak Type:=wdPageBreak
Selection.PasteAndFormat (wdPasteDefault)


End Sub

  #2   Report Post  
Posted to microsoft.public.word.docmanagement
Charles Kenyon
 
Posts: n/a
Default macro to unprotect / protect sheet in word

I would recommend posting this in the vba.beginners newsgroup rather than in
this one.

First, though, read
http://word.mvps.org/FAQs/MacrosVBA/...lfResetOff.htm which will show
you good code for protecting / unprotecting word documents.

The code you have posted would insert a page break in an unprotected
document. It has nothing to do with headers directly. It has nothing to do
with tables (which is where one finds cells). What are you trying to change
in the header? Why were you inserting a manual page break? (Generally manual
page breaks should be avoided.)
--
Charles Kenyon

Word New User FAQ & Web Directory: http://addbalance.com/word

Intermediate User's Guide to Microsoft Word (supplemented version of
Microsoft's Legal Users' Guide) http://addbalance.com/usersguide

See also the MVP FAQ: http://word.mvps.org/FAQs/ which is awesome!
--------- --------- --------- --------- --------- ---------
This message is posted to a newsgroup. Please post replies
and questions to the newsgroup so that others can learn
from my ignorance and your wisdom.


"Markc" wrote in message
...
Can anyne help, I have a macro in a word document that is used to create
extra copies(different page headers), when the sheet is protected(only
certain cells are completed by the user) the marco will not run..how can i
get round this.
current macro-

Sub ADVICENOTE()
'
' ADVICENOTE Macro
' Macro recorded 22/03/2006 by mchallacombe
'

Selection.WholeStory
Selection.Copy
Selection.MoveDown Unit:=wdLine, Count:=1
Selection.TypeParagraph
Selection.InsertBreak Type:=wdPageBreak
Selection.PasteAndFormat (wdPasteDefault)


End Sub



  #3   Report Post  
Posted to microsoft.public.word.docmanagement
Markc
 
Posts: n/a
Default macro to unprotect / protect sheet in word

Thanks, well, its a simply document that replaces an 'hand written' dpcument
bu use of of carbon copy pad (2 copies to a Customer, 2 to our business)or
though 1 to us would be suffucient.

As know one where I work really understands word, It has been left to me.

The cut/paste macro is used as page 1 have 'customer' copy as a header, 'RR
copy' as the other header.(we simply print 2 copies of each) & the only way i
could do this was a different header on odd & even pages. its the only way i
could find to print the same information on another sheet, but with a
different header.

The protection is where only certain fields need to be completed, which
avoids any unessasary modifing of other fields etc.

any help really is appreciated!!


"Charles Kenyon" wrote:

I would recommend posting this in the vba.beginners newsgroup rather than in
this one.

First, though, read
http://word.mvps.org/FAQs/MacrosVBA/...lfResetOff.htm which will show
you good code for protecting / unprotecting word documents.

The code you have posted would insert a page break in an unprotected
document. It has nothing to do with headers directly. It has nothing to do
with tables (which is where one finds cells). What are you trying to change
in the header? Why were you inserting a manual page break? (Generally manual
page breaks should be avoided.)
--
Charles Kenyon

Word New User FAQ & Web Directory: http://addbalance.com/word

Intermediate User's Guide to Microsoft Word (supplemented version of
Microsoft's Legal Users' Guide) http://addbalance.com/usersguide

See also the MVP FAQ: http://word.mvps.org/FAQs/ which is awesome!
--------- --------- --------- --------- --------- ---------
This message is posted to a newsgroup. Please post replies
and questions to the newsgroup so that others can learn
from my ignorance and your wisdom.


"Markc" wrote in message
...
Can anyne help, I have a macro in a word document that is used to create
extra copies(different page headers), when the sheet is protected(only
certain cells are completed by the user) the marco will not run..how can i
get round this.
current macro-

Sub ADVICENOTE()
'
' ADVICENOTE Macro
' Macro recorded 22/03/2006 by mchallacombe
'

Selection.WholeStory
Selection.Copy
Selection.MoveDown Unit:=wdLine, Count:=1
Selection.TypeParagraph
Selection.InsertBreak Type:=wdPageBreak
Selection.PasteAndFormat (wdPasteDefault)


End Sub




  #4   Report Post  
Posted to microsoft.public.word.docmanagement
Charles Kenyon
 
Posts: n/a
Default macro to unprotect / protect sheet in word

Create a second page in your form template while it is unprotected. Then
copy everything from the first page to the second page. Replace the form
fields on the second page with REF fields that will reproduce the
information that is typed on the first page.
http://gregmaxey.mvps.org/Repeating_Data.htm

Rather than use the header, I would insert Word Art (Insert Picture) to
say Customer Copy. You right click on this to change the format. On the
layout tab, change it to "behind text." Then you can move it into your
margin.

Finally, reprotect and save your template. Now you can produce new documents
(File New) and just enter the information once. To print only your
original, print just page 1. To print a customer copy, print page 2. To
print both, print the whole document.

What you are talking about is what Word calls an "online form." Check this
in help. For more about online forms, follow the links at
http://addbalance.com/word/wordwebresources.htm#Forms or
http://word.mvps.org/FAQs/Customizat...nTheBlanks.htm especially Dian
Chapman's series of articles. You may also want to look at
http://www.word.mvps.org/FAQs/TblsFl...nesInForms.htm.

Hope this helps,
--

Charles Kenyon

Word New User FAQ & Web Directory: http://addbalance.com/word

Intermediate User's Guide to Microsoft Word (supplemented version of
Microsoft's Legal Users' Guide) http://addbalance.com/usersguide

See also the MVP FAQ: http://word.mvps.org/FAQs/ which is awesome!
--------- --------- --------- --------- --------- ---------
This message is posted to a newsgroup. Please post replies
and questions to the newsgroup so that others can learn
from my ignorance and your wisdom.
"Markc" wrote in message
...
Thanks, well, its a simply document that replaces an 'hand written'
dpcument
bu use of of carbon copy pad (2 copies to a Customer, 2 to our business)or
though 1 to us would be suffucient.

As know one where I work really understands word, It has been left to me.


The cut/paste macro is used as page 1 have 'customer' copy as a header,
'RR
copy' as the other header.(we simply print 2 copies of each) & the only
way i
could do this was a different header on odd & even pages. its the only
way i
could find to print the same information on another sheet, but with a
different header.

The protection is where only certain fields need to be completed, which
avoids any unessasary modifing of other fields etc.

any help really is appreciated!!


"Charles Kenyon" wrote:

I would recommend posting this in the vba.beginners newsgroup rather than
in
this one.

First, though, read
http://word.mvps.org/FAQs/MacrosVBA/...lfResetOff.htm which will show
you good code for protecting / unprotecting word documents.

The code you have posted would insert a page break in an unprotected
document. It has nothing to do with headers directly. It has nothing to
do
with tables (which is where one finds cells). What are you trying to
change
in the header? Why were you inserting a manual page break? (Generally
manual
page breaks should be avoided.)
--
Charles Kenyon

Word New User FAQ & Web Directory: http://addbalance.com/word

Intermediate User's Guide to Microsoft Word (supplemented version of
Microsoft's Legal Users' Guide) http://addbalance.com/usersguide

See also the MVP FAQ: http://word.mvps.org/FAQs/ which is awesome!
--------- --------- --------- --------- --------- ---------
This message is posted to a newsgroup. Please post replies
and questions to the newsgroup so that others can learn
from my ignorance and your wisdom.


"Markc" wrote in message
...
Can anyne help, I have a macro in a word document that is used to
create
extra copies(different page headers), when the sheet is protected(only
certain cells are completed by the user) the marco will not run..how
can i
get round this.
current macro-

Sub ADVICENOTE()
'
' ADVICENOTE Macro
' Macro recorded 22/03/2006 by mchallacombe
'

Selection.WholeStory
Selection.Copy
Selection.MoveDown Unit:=wdLine, Count:=1
Selection.TypeParagraph
Selection.InsertBreak Type:=wdPageBreak
Selection.PasteAndFormat (wdPasteDefault)


End Sub






Reply
Thread Tools
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Word should allow to 'divide' page by 3 or 4, not just 2 CandasK Page Layout 2 February 28th 06 10:16 PM
WP merge file to Word sstires Tables 4 February 14th 06 06:26 PM
How can Word display full path of a file in the title bar? SAsif Microsoft Word Help 1 January 26th 06 04:32 PM
Does Word have a QuickCorrect/Quick Word option like WordPerfect? CW New Users 2 December 20th 05 05:54 PM
In Word, how do I surpress headers and footers on page 2 Bill Microsoft Word Help 1 December 15th 05 06:13 PM


All times are GMT +1. The time now is 03:00 PM.

Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 Microsoft Office Word Forum - WordBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Word"