How can I write a query to find machines which installed office 2003 and office 2010 in SCCM version 4.00.6487.2000?
I don't have the collection for the PC anymore. It was deleted when we thought all PC's have Office 2010 installed.
By the way, for future reference, SCCM version 4.00.6487.2000 is SCCM 2007 Service Pack 2 (SP2). Anyway, to get back to your initial question, copy and paste the following query code into the Query Language section of a new query and name the new query something like "All Systems Running Office 2003":
Then, click on the query, and you should see all systems that are running Office 2003. Then, if you are satisified with this, you can simply create a collection if you really want to by linking this query with your new collection so you don't have to recreate the query again. However, if you just want to display which systems are still running Office 2003, then this query should work for you. If a manager or someone needs a report showing which systems are still running it you can export the findings to a .csv file in Excel and mail that to them.
If you have any issues, let me know.