Head-scratcher concerning wildcards and Word 2007

E

emporter

Hi everybody --

I've run into a problem concerning Word 2007's find/replace feature
involving wildcards.

To keep this very brief, we use a trick to duplicate italics from one
version of a file into a new, cleaned up version. All text in need of
italicization is "bookmarked" by Q's so it would look like: QQQQI need
italicsQQQQ.

We use find and replace with a simple wildcard:

Find: QQQQ*QQQQ
Replace: (format: Italics)

Then we remove the Q's, and voila, MOST of us end up with everything
italicized as intended. However, we've just discovered that only those Word
2007 users on desktops get the Q's and the text between them italicized.

Word 2007 users on laptop end up with only the Q's italicized.

Granted, our wildcard trick is pretty jerry-rigged, but does anyone know of
a specific bug or keystroke conflict that would make Word stop treating
QQQQ*QQQQ as a single string on laptop? Or is there some other flavor of evil
afoot?

This simple trick saves people hours of work duplicating those italics, so
an answer/solution/workaround is desperately needed.

Help, please?
 
T

Tony Jollans

You really haven't given much detail, but there is no difference between
Word on a desktop and Word on a laptop, so whatever is happening is caused
by something else in your environments.

You say you replace the marked text with italics and then delete the Qs -
two operations; is this done manually or with a macro? To only have the Qs
italicised implies that the removal hasn't worked - much more I can't say.
As an aside, you can perform both operations in a single F&R (replace
QQQQ(*)QQQQ with \1 formatted italic).
 
E

emporter

Thanks, Tony, for your quick response. And sorry, I just didn't want to bog
this down with too much expo if this was a known issue.

What we're actually doing is taking submitted versions of .docs or .rtfs and
cleaning them up a bit, then bookmarking the italics with the Q's, as
mentioned. That's the first simple find and replace:

Find: (format: Italics)
Replace: QQQQ^&QQQQ

So, still working in the submitted version, we now have all italicized text
framed with Q's.

Then we select and copy the entire slightly-cleaned-up document, and paste
it into Notepad to nuke latent coding and all formatting. The entire
text-body is then selected and copied again from Notepad this time, then
pasted into a fresh .doc (template with pre-set styles).

All italics are lost once text is dropped into Notepad, so the Q's, which
carry over from original to Notepad to fresh .doc) give us something quick
(and dirty) to work with in replacing all those italics quickly.

We then use a 2-step process to deal with the italics and extra Q's:

1)
Find: QQQQ*QQQQ
Replace: (format: Italics)

2)
Find: QQQQ
Replace: (nothing)

It works perfectly for everyone except laptop 2007. I haven't the foggiest
idea why this is happening (did I mention I'm a wildcard noob?), and after
hours Googling this problem, I've found a lot of other helpful info, but
nothing on this specific bugaboo.
 
T

Tony Jollans

1)
Find: QQQQ*QQQQ
Replace: (format: Italics)

2)
Find: QQQQ
Replace: (nothing)

It works perfectly for everyone except laptop 2007.

What does happen? After step 1? After step 2?
 
G

Graham Mayor

Like Tony I can see no reason why the replace should not work on a laptop.
Does the following macro work for you?

Sub ReplaceQ()
With ActiveDocument.Range.Find
.ClearFormatting
.Replacement.ClearFormatting
.Replacement.Font.Italic = True
.Execute findText:="QQQQ(*)QQQQ", _
MatchWildcards:=True, _
replacewith:="\1", _
Replace:=wdReplaceAll
End With
End Sub

Wildcards are explained at http://www.gmayor.com/replace_using_wildcards.htm

--
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
Graham Mayor - Word MVP


<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
 
E

emporter

On desktop:

After step 1, all the Q's and everything in between are italicized.
After step 2, the Q's are gone, leaving just the italicized text.

On laptop:

After step 1, only the Q's are italicized. The text between them is not.
If they continue on to step 2, the Q's may or may not disappear. There was
one 2007 laptopper for whom the Q's stayed. For the two other laptoppers, the
Q's disappear as intended.
 
E

emporter

Hi Graham --

Ironically, the page you linked me to (and what a page it is) is what laid
the foundation for this trick.

Currently, we don't allow use of macros due to security and technical
concerns. (Our poor crew has a steep enough learning curve already without
introducing macros to the list).

Anyway, I really am stumped by all this. I've just sent out an email to poll
the whole crew for more information on what's working, what's not,
confirmation of OS, Word Version, laptop vs desktop, etc, to see if I can't
find other conflicts a/o constants to work with. (also to make sure they can
reproduce the error every single time)

I will no doubt come crying again as soon as more ducks have been aligned.

Thanks for all your help.
 
D

Doug Robbins - Word MVP

Graham's macro certainly does what it is intended to on a laptop running
Word 2007 under Vista and also on one running Word 2007 under Windows XP.

--
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, originally posted via msnews.microsoft.com
 
J

Jay Freedman

As part of the information-gathering, get the _exact_ version information for
each copy of Word: Ask them to go to Office button > Word Options > Resources
and copy the line under the "about Microsoft Word 2007" heading (by hand --
unfortunately it isn't possible to highlight and copy it). That will tell you
whether it's the original (release to manufacturing or RTM) version, Service
Pack 1, or Service Pack 2. It's more likely that the laptops have an older
release than the desktops do.

--
Regards,
Jay Freedman
Microsoft Word MVP
Email cannot be acknowledged; please post all follow-ups to the newsgroup so all
may benefit.
 
E

emporter

Hi, everybody --

Thank you very much for your attention on this matter. I'm working toward
gathering as much data as possible on Word versions and "what happens
when...".

I'll pass it along as soon as everyone chimes in and I can organize it into
something less resembling a mess.

Thanks again.
 
P

Peter Jamieson

Two suggestions:
a. are the video cards/drivers on the laptops different from the ones
on the desktops?
b. there is one documented difference in behaviour between tablet PCs
and non-tablet PCs. It isn't in the area you describe, so I have no
particular reason to believe it would cause the differnece you are
seeing. But if you happen to have tablet PCs versus desktops, or perhaps
Vista PCs with some tablet functionality versus non-Vista, non-tablet
PCs, perhaps the behaviour you are seeing is a manifestation of the same
underlying problem.

Peter Jamieson

http://tips.pjmsn.me.uk
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top