Word removes "public.content," messes up Spotlight

D

Drdul

FYI: I just discovered that when I open a previously-created Word file for the first time in Word 2008, the "public.content" attribute is somehow removed. When I search in Spotlight and filter for "content kind" = "document," these files no longer appear in the results, due to the missing "public.content" attribute (which OS X apparently needs in order to define the file as a document). So if you're having difficulty finding Word files with Spotlight, search for files with names that end in "doc" instead.
 
J

John McGhie

I am not sure I understand this issue? My .docx's are showing up OK in
Spotlight?

More detail, if you would?


FYI: I just discovered that when I open a previously-created Word file for
the first time in Word 2008, the "public.content" attribute is somehow
removed. When I search in Spotlight and filter for "content kind" =
"document," these files no longer appear in the results, due to the missing
"public.content" attribute (which OS X apparently needs in order to define the
file as a document). So if you're having difficulty finding Word files with
Spotlight, search for files with names that end in "doc" instead.

--
Don't wait for your answer, click here: http://www.word.mvps.org/

Please reply in the group. Please do NOT email me unless I ask you to.

John McGhie, Consultant Technical Writer
McGhie Information Engineering Pty Ltd
http://jgmcghie.fastmail.com.au/
Sydney, Australia. S33°53'34.20 E151°14'54.50
+61 4 1209 1410, mailto:[email protected]
 
D

Drdul

Here's what happens:

A .doc file previously created in Word for Windows includes the following content tree items:

com.microsoft.word.doc, public.data, public.item, public.composite-content, public.content

If I open one of these files in Word 2008 (even if I don't make any changes or re-save it), the content tree is reduced to:

com.microsoft.word.doc, public.data, public.item

If I use Spotlight (the full-blown Spotlight search invoked with Cmd-F in the Finder or Opt-Cmd-Space, not the simple Spotlight search in the top right corner of the screen) to search for documents, the absence of the public.content attribute from the content tree means that these files no longer appear if I restrict the search by setting "Kind" to "Documents."

The public.content attribute appears in documents created by other applications, including Acrobat Pro and TextEdit, for example. As a result, files created by these programs appear in a Kind = Documents search. For some reason, Word 2008 is inadvertently stripping off the public.content attribute.

I wasted a half hour looking for a file before I figured out what was happening! Now that I know what Word is doing, I can search for file names ending in "doc" to include Word 2008 files in a search. That's a kludgy workaround, and I'm hoping that MS will fix this soon.
 
C

CyberTaz

I'm not seeing this happen in OS X 10.4.11 and to confirm by retest I just
opened a file [which I know to have been created in Word 2003 on a PC] in
Word 2008, then closed the file without saving. I also opened the same file
after a search, saved & closed.

With a Spotlight search set to Kind:Documents, Last Opened:Today the .doc
was presented in both cases - the search both before & after the save.

Regards |:>)
Bob Jones
[MVP] Office:Mac
 
D

Drdul

Hi Bob:

I wouldn't know about Tiger, as I'm using Leopard 10.5.1. In the example you provided, what is in the content tree of the .doc file before and after it was opened in Word 2008? Is Word stripping off "public.content" on your system?

Also, what type of Spotlight search did you do — the quickie one in the top right corner of the screen, or the full-blown one in a Finder window? I have found that for some reason the quickie search with "kind:document" will show the files that have had public.content stripped from the content tree, whereas they do not show in the full-blown Spotlight search. Given that the full-blown search is the only types of Spotlight search that can be saved, this is an important issue.

Cheers!
 
C

CyberTaz

My searches were implemented with a full Spotlight search: Cmd+F, set Kind
to Document & set Last Opened to Today.

I'm afraid, however, I'm not familiar with what you're referring to as a
"content tree" or how to access same. If you'll be kind enough to fill me in
I'd be happy to check. Not meaning to contradict myself, though, I can't see
why it would make a difference since Spotlight is locating the file even if
it is being stripped as you suggest. Perhaps other forces are at work:) It
may even be specific to Leopard based on John's findings - although I'm not
sure which OS he was using at the time. I believe he's still using both 10.4
as well as 10.5, and he made no mention of which in his post.

Regards |:>)
Bob Jones
[MVP] Office:Mac
 
D

Drdul

Hi Bob:

The fact that you successfully used the full-blown Spotlight search suggests that it may be a Leopard-specific issue. I'm really curious to learn what's happening to the content tree in files on your system.

I'm relatively new to OS X, so I'm not an expert in this area by any means. What I've learned so far is that "public.content" is one of many Uniform Type Identifiers (UTIs) used in OS X (see for more info). Apple describes "public.content" as the "base type for anything containing user-viewable document content (documents, pasteboard data, and document packages)." In other words, OS X — and more to the point, Spotlight — expects a document of any type to include a "public.content" UTI.

The group of UTIs attached to a document is sometimes known as a "content tree." I use Path Finder to view the content tree (it is visible in the Info panel/window). I don't know another way to view UTIs or the content tree, but perhaps someone else with a better understanding of the inner workings of OS X can help.

Cheers!
 

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