View Single Post
  #3   Report Post  
Posted to microsoft.public.word.mailmerge.fields
Bob on Whidbey Bob on Whidbey is offline
external usenet poster
 
Posts: 2
Default After mail merge, "File format is not valid" error when opening XLS file

I created the data file (DB) with MS Excel. Then I used Word and a
mail merge. While in mail merge I edited the DB. Access to the editor
was on the Mail Merge tool bar, where it says "Edit recipient
list..."

Upon selecting to edit the DB file, I am not asked about using MS
Query. When I click the "Edit recipient list..." my data appears in a
box, ready for selecting records and then making edits.

While closing Word, I was asked if I wanted to save my changes to the
DB and I clicked yes. The file still has an XLS extension, but can no
longer be opened with Excel. However, I can get into Word's mail merge
and still edit any field I want. Or course, no formulas can be used.
So the file is definitely not corrupted - at least as far as mail
merge is concerned. My problem is - I want to be able to edit the file
in Excel. Most importantly I don't want to lose that file. At the
moment, it can only be used with mail merge.

When I first open the DOC file, I am warned "Opening this document
will run the following SQL command
SELECT * FROM C:\....name of my file"

Whether or not I check yes or no seems to make little difference. If I
click no, later on I can select the appropriate XLS file - with no
warning.

I'm guessing that Word is using an OLD DB provider for ODBC Drivers.

"Confirm conversion at Open" is NOT checked. When I edit a field in
Word, the "View Source" button is the only button grayed out.

Yes, I do have pretty good back up. I'm trying to discover
1. what format the XLS file is actually using.
2. how did I possibly convert my file from an Excel format to this new
format (whatever it is), so I can avoid doing that in the future.
3. is it really true that Word could have converted my Excel file to a
new format - but still use the same file extension.
4. since Word somehow converted this file to its own format, is there
a way I can convert it back to Excel's format.


On Jul 2, 2:40 am, "Peter Jamieson"
wrote:
I would be interested to know how you are editing your Excel data source.

If I select an Excel worksheet as a data source in Word 2003 using the
default connection method (OLE DB), and use "Edit "Mail Merge Recipients",
the Edit button is greyed out. If you are unaware of what connection method
you are using, then Word should be using OLE DB.

At least one reason why Microsoft probably disabled the Edit button in this
case is because the mechanism that Word would have to use to edit the data
when it connects using OLE DB is unreliable and likely to cause exactly the
kind of corruption you describe.

If you have checked Word Tools|Options|"Confirm conversion at Open" and
selected DDE, then the worksheet should be opened in Excel and clicking that
Edit button in Word should take you to Excel to edit the data. Another
possibility is that Word.

If you used (or Word used) ODBC to make the connection, Word enables the
Edit button, but when you click it, Word asks if you want to use MS Query to
edit it. If you say no, nothing happens (AFAIK) - i.e. you get no
opportunity to do the edits. If you say Yes, in theory Word opens MS Query,
but again, it now uses an editing mechanism that I suspect is now
unreliable.

Maybe your copy of Word is doing something different?

As for what you can do to recover your existing data, I'm sorry, I simply
don't know Excel well enough to make a suggestion - you might try an Excel
group. Otherwise, let's hope you have a recent backup.

Peter Jamieson

"Bob on Whidbey" wrote in ooglegroups.com...

While completing a mail merge in Word, I edited a few fields in the
data base (an XLS file). Upon closing Word, I was asked if I wanted to
save the changes to the data base. Of course I said yes. All
subsequent attempts to open that XLS file have been blocked with the
error message in Excel: "File format is not valid". I am using Office
2003.


It seems like Word has created a different version of the file for its
purposes, and overwritten the XLS file in the process. Yet, it's hard
to believe that Word would create a different version of the file and
keep the same file extension!


What do I need to do to open that XLS file in Excel?