Re: Finding and replacing in Word using macros

Tech-Archive recommends: Speed Up your PC by fixing your registry



I will try that... Thanks so much for all your help!

Donna


"Jay Freedman" wrote:

> Hi Donna,
>
> There isn't any simple way to extract the first word in a Ref field.
>
> Probably a better method would be to put the long name and the short name
> into two separate custom document properties (which you can set up on the
> Custom tab of the File > Properties dialog, or create a userform to collect
> the information and add the properties as members of the
> CustomDocumentProperties collection). Then replace the bookmark with a
> DocProperty field pointing to the long name, and replace the cross-reference
> with a DocProperty field pointing to the short name.
>
> --
> Regards,
> Jay Freedman
> Microsoft Word MVP FAQ: http://word.mvps.org
>
> Donna_82 wrote:
> > Thanks so much! That worked perfectly.
> >
> > I just have one more question.... hard to believe I know!
> > Is there anyway to take only the first word of the bookmark and
> > insert it in one of the references. For example, I will be entering
> > a company name. When it is entered in the report the whole company
> > name will be inserted (i.e. "Smith's Services Ltd.") but in the
> > headers I want only the abbreviated name to show up (i.e.
> > "Smith's")... Is this possible?
> >
> > Thanks again!
> > Donna
> >
> > "Jay Freedman" wrote:
> >
> >> Hi Donna,
> >>
> >> Include a \*CHARFORMAT switch in the REF field, and the result of the
> >> field will always have the same character formatting as the R in REF
> >> (which is usually the same as the rest of the field code but doesn't
> >> have to be). See the help topic "Format (\*) field switch".
> >>
> >> --
> >> Regards,
> >> Jay Freedman
> >> Microsoft Word MVP FAQ: http://word.mvps.org
> >>
> >> On Fri, 6 May 2005 04:25:14 -0700, "Donna_82"
> >> <Donna82@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote:
> >>
> >>> Hi Greg,
> >>>
> >>> Thanks a lot! That link was very helpful.
> >>>
> >>> I'm just wondering if there's any way to link the text with the
> >>> cross referenced bookmarks that will only change the words in the
> >>> bookmark and not the formatting. For example, the text will be on
> >>> a title page and in a header and obviously the formatting would not
> >>> be the same in both.
> >>>
> >>> Thanks in advance,
> >>> Donna
> >>>
> >>> "Greg" wrote:
> >>>
> >>>> Donna,
> >>>>
> >>>> See:
> >>>> http://gregmaxey.mvps.org/Repeating_Data.htm
>
>
>
.