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 / June 2007

Tip: Looking for answers? Try searching our database.

Exclude hidden appendix from search range in vba

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
jlashley - 25 Jun 2007 21:47 GMT
Hello,
In a word 2003 documend, is there a way to exclude from a search range
(vba) the hidden appendix used for the browser ?  when I use the
search module from Doug  & Helmut, I've got results inside this hidden
part but I need only to search in the  "visible" part of the file..

Any way to do this ??

Many thanks in adabce

JL
Doug Robbins - Word MVP - 26 Jun 2007 09:48 GMT
You could probably use code to check whether the selection is in that
section of the document and have it skip whatever you are doing if it is.

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

> Hello,
> In a word 2003 documend, is there a way to exclude from a search range
[quoted text clipped - 7 lines]
>
> JL
jlashley - 26 Jun 2007 19:41 GMT
Ok.
as I'm new in word VBA, I thought it was a property or mefhod for this
part of document.
Thanks

>You could probably use code to check whether the selection is in that
>section of the document and have it skip whatever you are doing if it is.
Russ - 27 Jun 2007 06:56 GMT
Are you using the Word interface to collapse parts of the document from view
according to style format hierarchy?
That interface doesn't hide the text from the 'find and replace' functions.

It doesn't, for example, give the unseen text the property of:
selection.font.hidden = True

> Ok.
> as I'm new in word VBA, I thought it was a property or mefhod for this
[quoted text clipped - 3 lines]
>> You could probably use code to check whether the selection is in that
>> section of the document and have it skip whatever you are doing if it is.

Signature

Russ

drsmN0SPAMikleAThotmailD0Tcom.INVALID

jlashley - 27 Jun 2007 21:23 GMT
Hello,
I'm sorry, but I can't reply : before to work on such document, I
never seen this feature :  when  I click on the stat of this "hdden
appendix", corresponding to xml flux, automatically I go to the first
page of the document...
For example for 9 real pages ( I can print...) , whith this "hidden
appendix", Word count 41 pages..

Regards

>Are you using the Word interface to collapse parts of the document from view
>according to style format hierarchy?
[quoted text clipped - 10 lines]
>>> You could probably use code to check whether the selection is in that
>>> section of the document and have it skip whatever you are doing if it is.
Russ - 28 Jun 2007 06:00 GMT
Jlashley,
You must be opening a WordML file in such a way to see the XML code in
Word2003.
Try opening the file as a regular Word document in the open file dialog box
(as a regular .doc file?) so that you don't see the XML code used for
formatting. Then you can use the Find and Replace on the real, visible part
of the document.
I have no experience with the XML capabilities of Word, since the versions I
normally use don't have that feature.

> Hello,
> I'm sorry, but I can't reply : before to work on such document, I
[quoted text clipped - 20 lines]
>>>> You could probably use code to check whether the selection is in that
>>>> section of the document and have it skip whatever you are doing if it is.

Signature

Russ

drsmN0SPAMikleAThotmailD0Tcom.INVALID

Doug Robbins - Word MVP - 27 Jun 2007 10:03 GMT
What do you want to do if the text is found other than in the appendix?

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

> Ok.
> as I'm new in word VBA, I thought it was a property or mefhod for this
[quoted text clipped - 3 lines]
>>You could probably use code to check whether the selection is in that
>>section of the document and have it skip whatever you are doing if it is.
jlashley - 27 Jun 2007 20:54 GMT
Hello,
I want to copy the text only behind the search string, but only if
it's in the "visible" part of the document .
The probem is that in some document, the search string may be in the
hidden and not in the "visible" part, so the idea to  test the
section's  numbers is fine; In this this cas I nothing do
(In fact, this hiddden appendix is the XML flow)

 

>What do you want to do if the text is found other than in the appendix?
Doug Robbins - Word MVP - 28 Jun 2007 03:55 GMT
Well, I am not sure that it is applicable to your situation, which I do not
understand, but what I was thinking was to include an If  ... then ...End If
construction that checked whether the font of found text was formatted as
Hidden.

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

> Hello,
> I want to copy the text only behind the search string, but only if
[quoted text clipped - 5 lines]
>
>>What do you want to do if the text is found other than in the appendix?
 
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.