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 2006

Tip: Looking for answers? Try searching our database.

Search & Delete Notes Pages

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
jstengren - 03 Aug 2006 16:51 GMT
I posted this as a vague question some time back, and was asked for
more detail... so, I'll try and clarify:

I write training documentation, and in this documentation we
occasionally insert an 'instructor notes page'... which is basically a
page (always even-numbered) containing notes for the teacher regarding
the content on the next page. A document may have any number of these
notes pages, and we currently are using an autotext entry to insert the
page based on a heading style that breaks the page (so, no formal
page-break is used when inserting). However, this approach could be
changed.

After creating a document with n numbers of notes pages, I need to be
able to run a script or macro to programmatically loop through and
delete all of these notes pages. One of my co-workers recommended
attaching a bookmark to the notes page autotext, and then creating code
to loop through and delete the bookmarks (we don't use bookmarks
currently), resulting in a notes page free document. However, I found
out that I'd need a new bookmark name for each notes page I insert!
This becomes a problem for deletion because, even if I manually
bookmark every notes page, I don't have any code/script/macro that
would delete ALL sections defined by bookmarks within a document.

If there was a way to just say, "Delete all sections that are
bookmarked within this document." we may have a solution. Otherwise,
let's not think about bookmarks. Is there a way I could use
find/replace on the style used for the heading text on the notes page?
Or, perhaps use a specific font for notes and find/delete that font
style? Or could I somehow customize the page/section breaks for notes
pages? The possibilities are wide-open.

I look forward to your feedback, and feel free to ask questions if
anything needs clarification.
jstengren - 03 Aug 2006 17:29 GMT
I had an idea... since each of these notes pages is started with a
*heading-notes style and ends with a page break, can't I somehow search
the document for the*heading-notes style, then define a section from
that style to the next page break, and then delete -- loop through the
entire document repeating that process?

> I posted this as a vague question some time back, and was asked for
> more detail... so, I'll try and clarify:
[quoted text clipped - 29 lines]
> I look forward to your feedback, and feel free to ask questions if
> anything needs clarification.
Russ - 12 Aug 2006 23:48 GMT
Jstengren,
Reply in middle of text.

> I had an idea... since each of these notes pages is started with a
> *heading-notes style and ends with a page break, can't I somehow search
[quoted text clipped - 27 lines]
>> If there was a way to just say, "Delete all sections that are
>> bookmarked within this document." we may have a solution.
Dim aBookMark As Word.Bookmark
For Each aBookMark In ActiveDocument.Bookmarks
aBookMark.Range.Expand Unit:=wdSection
aBookMark.Range.Delete
Next aBookMark
End Sub

This works, if your notes are delineated by section breaks before and after;
and each has a bookmark embedded within. Or leave out the expand line of
code, if each note is bookmarked as a whole and not 'sectioned' off.
>> Otherwise,
>> let's not think about bookmarks. Is there a way I could use
[quoted text clipped - 5 lines]
>> I look forward to your feedback, and feel free to ask questions if
>> anything needs clarification.

Also, you could could format your notes' font as hidden and show or hide the
text or option to print hidden text or not.
Signature

Russ

drsmN0SPAMikleAThotmailD0Tcom.INVALID

 
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.