Reply
 
Thread Tools Display Modes
  #1   Report Post  
Posted to microsoft.public.word.docmanagement
Kimmi Kimmi is offline
external usenet poster
 
Posts: 15
Default Searching and replacing form fields

Can anyone help.

I am trying to search for a form field containg a square bracket and replace
it with nothing. There are lots of occurrences in the document and if I do a
simple search and replace or [ with nothing, the square bracket returns when
the fields are updated. And there are other form fields that I don't want to
replace!

I'm using word 2000

Thanks
  #2   Report Post  
Posted to microsoft.public.word.docmanagement
Cindy M. Cindy M. is offline
external usenet poster
 
Posts: 2,416
Default Searching and replacing form fields

Hi ?B?S2ltbWk=?=,

I am trying to search for a form field containg a square bracket and replace
it with nothing. There are lots of occurrences in the document and if I do a
simple search and replace or [ with nothing, the square bracket returns when
the fields are updated. And there are other form fields that I don't want to
replace!

I'm using word 2000

We're talking about a protected document, here? And you're trying to run
find/replace on the protected document, or the unprotected one?

Could you give us an example of content in a form field you're trying to
replace?

Is there any chance this is a "prompt" placeholder (default text) for the form
fields?

Cindy Meister
INTER-Solutions, Switzerland
http://homepage.swissonline.ch/cindymeister (last update Jun 17 2005)
http://www.word.mvps.org

This reply is posted in the Newsgroup; please post any follow question or reply
in the newsgroup and not by e-mail :-)

  #3   Report Post  
Posted to microsoft.public.word.docmanagement
Kimmi Kimmi is offline
external usenet poster
 
Posts: 15
Default Searching and replacing form fields

Hi Cindy
I'm talking about unprotected documents. I use form fields as a way of
people jumping to the next fill in spot using F11 key, but as they will also
be editing lots of other areas of the document it's not protected. One
example is a form text field containing [ as the default text. And we want
to be able to search and replace this in one go, without removing all field
codes from the document.
Thanks

"Cindy M." wrote:

Hi ?B?S2ltbWk=?=,

I am trying to search for a form field containg a square bracket and replace
it with nothing. There are lots of occurrences in the document and if I do a
simple search and replace or [ with nothing, the square bracket returns when
the fields are updated. And there are other form fields that I don't want to
replace!

I'm using word 2000

We're talking about a protected document, here? And you're trying to run
find/replace on the protected document, or the unprotected one?

Could you give us an example of content in a form field you're trying to
replace?

Is there any chance this is a "prompt" placeholder (default text) for the form
fields?

Cindy Meister
INTER-Solutions, Switzerland
http://homepage.swissonline.ch/cindymeister (last update Jun 17 2005)
http://www.word.mvps.org

This reply is posted in the Newsgroup; please post any follow question or reply
in the newsgroup and not by e-mail :-)


  #4   Report Post  
Posted to microsoft.public.word.docmanagement
Suzanne S. Barnhill Suzanne S. Barnhill is offline
external usenet poster
 
Posts: 33,624
Default Searching and replacing form fields

For a document of this type, instead of using form fields, I would use
MacroButton NoMacro fields (see
http://word.mvps.org/FAQs/TblsFldsFm...croButton.htm). If you do this,
then your field syntax could be something like { MacroButton NoMacro [Click
here and type name] }. There are two advantages to this approach:

1. You can search for specific MacroButton fields (more on that later).

2. Since each field is overwritten when it's filled in, it's easy to search
for fields that haven't been filled in.

To search for the MacroButton field in the example above and delete it, use

^ 19 MacroButton NoMacro [Click here and type name]

as the "Find what" text, leaving "Replace with" blank. You must have field
codes displayed (Alt+F9) for this to work.

You can also search for any MacroButton field the same way, or for any
MacroButton field whose prompt text starts with [ by searching for

^19 MacroButton NoMacro [

The two critical components here are that including ^19 (or ^d) causes Word
to select the entire field, and that the syntax of MacroButton fields
includes the "prompt," which would be comparable to the default text in a
form field (FORMTEXT fields don't display the default text).

--
Suzanne S. Barnhill
Microsoft MVP (Word)
Words into Type
Fairhope, Alabama USA
Word MVP FAQ site: http://word.mvps.org
Email cannot be acknowledged; please post all follow-ups to the newsgroup so
all may benefit.

"Kimmi" wrote in message
...
Hi Cindy
I'm talking about unprotected documents. I use form fields as a way of
people jumping to the next fill in spot using F11 key, but as they will

also
be editing lots of other areas of the document it's not protected. One
example is a form text field containing [ as the default text. And we

want
to be able to search and replace this in one go, without removing all

field
codes from the document.
Thanks

"Cindy M." wrote:

Hi ?B?S2ltbWk=?=,

I am trying to search for a form field containg a square bracket and

replace
it with nothing. There are lots of occurrences in the document and if

I do a
simple search and replace or [ with nothing, the square bracket

returns when
the fields are updated. And there are other form fields that I don't

want to
replace!

I'm using word 2000

We're talking about a protected document, here? And you're trying to run
find/replace on the protected document, or the unprotected one?

Could you give us an example of content in a form field you're trying to
replace?

Is there any chance this is a "prompt" placeholder (default text) for

the form
fields?

Cindy Meister
INTER-Solutions, Switzerland
http://homepage.swissonline.ch/cindymeister (last update Jun 17 2005)
http://www.word.mvps.org

This reply is posted in the Newsgroup; please post any follow question

or reply
in the newsgroup and not by e-mail :-)



  #5   Report Post  
Posted to microsoft.public.word.docmanagement
Cindy M. Cindy M. is offline
external usenet poster
 
Posts: 2,416
Default Searching and replacing form fields

Hi ?B?S2ltbWk=?=,

I'm talking about unprotected documents. I use form fields as a way of
people jumping to the next fill in spot using F11 key, but as they will also
be editing lots of other areas of the document it's not protected. One
example is a form text field containing [ as the default text. And we want
to be able to search and replace this in one go, without removing all field
codes from the document.

Well, since this is default text you can't remove it from the field. Your code
would need to change the default text property of that particular form field.
For example

ActiveDocument.FormFields(index).TextInput.Default = ""

Cindy Meister
INTER-Solutions, Switzerland
http://homepage.swissonline.ch/cindymeister (last update Jun 17 2005)
http://www.word.mvps.org

This reply is posted in the Newsgroup; please post any follow question or reply
in the newsgroup and not by e-mail :-)

Reply
Thread Tools
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Replacing text with Merge Fields in Word Drew Mailmerge 7 October 4th 06 10:47 AM
Auto fill Form Fields from previous Variable fields? OmaScott Microsoft Word Help 3 July 19th 06 09:09 PM
Searching external tool for removing/replacing (private) document properties? Jochen Brenzlinger Microsoft Word Help 0 April 29th 06 09:57 AM
Searching external tool for removing/replacing (private) document properties? Jochen Brenzlinger New Users 0 April 29th 06 09:57 AM
MS Word form fields versus mail merge fields [email protected] Mailmerge 4 March 4th 06 05:31 PM


All times are GMT +1. The time now is 09:18 PM.

Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 Microsoft Office Word Forum - WordBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Word"