Hi.
I am launching word from Oracle forms using OLE2 funcionality
can anyone tell me the code to insert sections and protecting them
The following will insert a continuous section break at the location of the
selection and protect the section after that break.
Dim asection As Section
Dim arange As Range
Set arange = Selection.Range
Set asection = ActiveDocument.Sections.Add(arange, wdSectionContinuous)
asection.ProtectedForForms = True
ActiveDocument.Protect wdAllowOnlyFormFields

Signature
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
> Hi.
> I am launching word from Oracle forms using OLE2 funcionality
> can anyone tell me the code to insert sections and protecting them
Word.user - 13 Aug 2007 00:54 GMT
Thanks for the info,
I want to add and delete sesctions dynamically, so how can I delete all the
existing sections in a document when I open and then add the new. I have got
the add new sections, but how can I delete all sections in a document when I
Open the document?
> The following will insert a continuous section break at the location of the
> selection and protect the section after that break.
[quoted text clipped - 9 lines]
> > I am launching word from Oracle forms using OLE2 funcionality
> > can anyone tell me the code to insert sections and protecting them
Doug Robbins - Word MVP - 13 Aug 2007 01:25 GMT
Use Edit>Replace with ^b in the Find what control and nothing in the Replace
with control.

Signature
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
> Thanks for the info,
> I want to add and delete sesctions dynamically, so how can I delete all
[quoted text clipped - 19 lines]
>> > I am launching word from Oracle forms using OLE2 funcionality
>> > can anyone tell me the code to insert sections and protecting them
Word.user - 13 Aug 2007 05:28 GMT
Thanks a lot....
> Use Edit>Replace with ^b in the Find what control and nothing in the Replace
> with control.
[quoted text clipped - 22 lines]
> >> > I am launching word from Oracle forms using OLE2 funcionality
> >> > can anyone tell me the code to insert sections and protecting them