Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Word / Programming / August 2007

Tip: Looking for answers? Try searching our database.

Insert Section Breaks and protect Sections using OLE2

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Word.user - 10 Aug 2007 07:12 GMT
Hi.
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 - 10 Aug 2007 09:40 GMT
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
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.