Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.word.pagelayout
|
|||
|
|||
How do I add section breaks in VBA?
I'm interested in having my entire document protected except for a
single word which I need the user to be able to edit a hyperlink. The word is on its own line, so I put in a continuous section break before and after the line, and then protected all of the document except section 2 (which is the line with the word I need unprotected). This seemed to work fine, but I don't know how to replicate it in code, which I need to do. Can anyone help? Thanks alot, Steve |
#2
Posted to microsoft.public.word.pagelayout
|
|||
|
|||
How do I add section breaks in VBA?
Dim myrange As Range, myrange2 As Range
Set myrange = Selection.Range Set myrange2 = myrange.Duplicate myrange.InsertBreak wdSectionBreakContinuous myrange2.Collapse wdCollapseEnd myrange2.InsertBreak wdSectionBreakContinuous -- Hope this helps. Please reply to the newsgroup unless you wish to avail yourself of my services on a paid consulting basis. Doug Robbins - Word MVP wrote in message ps.com... I'm interested in having my entire document protected except for a single word which I need the user to be able to edit a hyperlink. The word is on its own line, so I put in a continuous section break before and after the line, and then protected all of the document except section 2 (which is the line with the word I need unprotected). This seemed to work fine, but I don't know how to replicate it in code, which I need to do. Can anyone help? Thanks alot, Steve |
#3
Posted to microsoft.public.word.pagelayout
|
|||
|
|||
How do I add section breaks in VBA?
Doug:
I almost "get" the Duplicate property for ranges, but it keeps slipping away. Do you have any way to explain it so I'll understand better? Bear -- Windows XP, Word 2000 "Doug Robbins - Word MVP" wrote: Dim myrange As Range, myrange2 As Range Set myrange = Selection.Range Set myrange2 = myrange.Duplicate myrange.InsertBreak wdSectionBreakContinuous myrange2.Collapse wdCollapseEnd myrange2.InsertBreak wdSectionBreakContinuous -- Hope this helps. Please reply to the newsgroup unless you wish to avail yourself of my services on a paid consulting basis. Doug Robbins - Word MVP wrote in message ps.com... I'm interested in having my entire document protected except for a single word which I need the user to be able to edit a hyperlink. The word is on its own line, so I put in a continuous section break before and after the line, and then protected all of the document except section 2 (which is the line with the word I need unprotected). This seemed to work fine, but I don't know how to replicate it in code, which I need to do. Can anyone help? Thanks alot, Steve |
#4
Posted to microsoft.public.word.pagelayout
|
|||
|
|||
How do I add section breaks in VBA?
You set a duplicate range when you will be doing something to the original
range that will alter that range and then later want to perform another operation on what was the original range. -- Hope this helps. Please reply to the newsgroup unless you wish to avail yourself of my services on a paid consulting basis. Doug Robbins - Word MVP "Bear" (nospam) wrote in message ... Doug: I almost "get" the Duplicate property for ranges, but it keeps slipping away. Do you have any way to explain it so I'll understand better? Bear -- Windows XP, Word 2000 "Doug Robbins - Word MVP" wrote: Dim myrange As Range, myrange2 As Range Set myrange = Selection.Range Set myrange2 = myrange.Duplicate myrange.InsertBreak wdSectionBreakContinuous myrange2.Collapse wdCollapseEnd myrange2.InsertBreak wdSectionBreakContinuous -- Hope this helps. Please reply to the newsgroup unless you wish to avail yourself of my services on a paid consulting basis. Doug Robbins - Word MVP wrote in message ps.com... I'm interested in having my entire document protected except for a single word which I need the user to be able to edit a hyperlink. The word is on its own line, so I put in a continuous section break before and after the line, and then protected all of the document except section 2 (which is the line with the word I need unprotected). This seemed to work fine, but I don't know how to replicate it in code, which I need to do. Can anyone help? Thanks alot, Steve |
Reply |
Thread Tools | |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Replace Section Breaks with Page Breaks Automatically? | Microsoft Word Help | |||
Continuous Section breaks, Next page section breaks, headers and f | Page Layout | |||
Converting page breaks to section breaks automatically- 2007 | Page Layout | |||
Replace Section Breaks with Page Breaks Automatically? | Microsoft Word Help | |||
Page breaks in document with multiple section breaks | Microsoft Word Help |