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 / January 2006

Tip: Looking for answers? Try searching our database.

Find Parenthesis

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Kev - 03 Jan 2006 20:32 GMT
Trying to find all parentheses() in a word document. Not wanting to replace
them but copy them to another blank doc. I can find the begining "(" and the
end ")" but can not get it to read the letters inside the Parentheses.
Jean-Guy Marcil - 03 Jan 2006 21:54 GMT
Kev was telling us:
Kev nous racontait que :

> Trying to find all parentheses() in a word document. Not wanting to
> replace them but copy them to another blank doc. I can find the
> begining "(" and the end ")" but can not get it to read the letters
> inside the Parentheses.

Try this in the "Find What:" field of the Find dialog:

   \(*\)

Make sure to check the "Use wild cards" box (Click on "More..." at the
bottom of the dialog).

Signature

Salut!
_______________________________________
Jean-Guy Marcil - Word MVP
jmarcilREMOVE@CAPSsympatico.caTHISTOO
Word MVP site: http://www.word.mvps.org 

Kev - 04 Jan 2006 14:33 GMT
Great, Is there a way to do that in VB.NET? I have been working on this for a
while, I am new to programming and been stumped on this one for a while.

> Kev was telling us:
> Kev nous racontait que :
[quoted text clipped - 10 lines]
> Make sure to check the "Use wild cards" box (Click on "More..." at the
> bottom of the dialog).
Jean-Guy Marcil - 04 Jan 2006 17:34 GMT
Kev was telling us:
Kev nous racontait que :

> Great, Is there a way to do that in VB.NET? I have been working on
> this for a while, I am new to programming and been stumped on this
> one for a while.

What code do you have so far?

Signature

Salut!
_______________________________________
Jean-Guy Marcil - Word MVP
jmarcilREMOVE@CAPSsympatico.caTHISTOO
Word MVP site: http://www.word.mvps.org 

Kev - 09 Jan 2006 18:22 GMT
> Kev was telling us:
> Kev nous racontait que :
[quoted text clipped - 4 lines]
>
> What code do you have so far?

Before we get headed in the wrong direction, this is what I am trying to do
with this program. I am tryin to find all the acronyms in a document, compare
them to a master table list with the definitions, then append the acronym and
its definition in a table to the end of the document. The acronyms are always
surrounded by parenthesis in the document but what I am not sure of is the
best way to make this happen.
1. Is there a way to have VB.NET read the document and compare it to the
acronym master table, leave the acronyms that are found in the document and
remove the accronyms that are not found from the master list, then append the
results the the end of the document? or
2. Scan the document for anything in parenthesis, compare to a database or
the master list, get rid of the duplicates, then append all the found
acronyms to the end of the document?  or...
3. Is there a better way you see to do this?

Thanks
Jean-Guy Marcil - 10 Jan 2006 01:02 GMT
Kev was telling us:
Kev nous racontait que :

> Before we get headed in the wrong direction, this is what I am trying
> to do with this program. I am tryin to find all the acronyms in a
[quoted text clipped - 11 lines]
> all the found acronyms to the end of the document?  or...
> 3. Is there a better way you see to do this?

You can certainly do this with VB.Net, however, I am not proficient enough
with VB.Net to give you actual code.

But, what you need to do is:

Create a master list in a template as a 2-column table.
Create an array from all the items in parenthesis in your document, then
sort it and remove duplicates.
Create a document form your Master list template.
For each item in the master list first column, compare to each item in the
document array, if the master list item is not found, delete the
corresponding table row.
Finally, append that shorter version of the master list at then end of your
document.
Close without saving the document created from the master list.

(I could do all this in VBA, or even VB6 if I had to, but VB.NET... I would
have to spend too much time, which I do not have right now.
Try writing the code for each step of the overall procedure, then post back
in a new thread for each question you may have, unless someone already has
this kind of VB.NET code ready to go...)
Signature

Salut!
_______________________________________
Jean-Guy Marcil - Word MVP
jmarcilREMOVE@CAPSsympatico.caTHISTOO
Word MVP site: http://www.word.mvps.org 

Kev - 11 Jan 2006 21:01 GMT
I was told that hashtables would be something to look into. In the little
training I have with VB.NET or programming at all , I have no idea if this
would help or make things easier. Do you have an opinion on hashtables?

> Kev was telling us:
> Kev nous racontait que :
[quoted text clipped - 36 lines]
> in a new thread for each question you may have, unless someone already has
> this kind of VB.NET code ready to go...)
Jean-Guy Marcil - 12 Jan 2006 22:42 GMT
Kev was telling us:
Kev nous racontait que :

> I was told that hashtables would be something to look into. In the
> little training I have with VB.NET or programming at all , I have no
> idea if this would help or make things easier. Do you have an opinion
> on hashtables?

Here is a link for info on this topic:
   http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpref/html/frlr
fsystemcollectionshashtableclasstopic.asp


But, having never used them outside of a programming lesson, I cannot really
advise you here.

Since your need is simple (You only need to compare the info in the doc with
the list once) and do not need to manipulate it further, I do not think that
it would actually make you life easier or make the code run that much
faster...

But I could be wrong!

Signature

Salut!
_______________________________________
Jean-Guy Marcil - Word MVP
jmarcilREMOVE@CAPSsympatico.caTHISTOO
Word MVP site: http://www.word.mvps.org 

 
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.