View Single Post
  #2   Report Post  
Posted to microsoft.public.word.mailmerge.fields
Peter Jamieson Peter Jamieson is offline
external usenet poster
 
Posts: 4,582
Default Word was unable to open the data source

1. Which version of Windows? Is it Vista?

2. If you have not tried already, try opening your Excel document first,
then making the connection. This is tedious, but it may help.

3. You can fix this problem by using "formatting switches" in Word:

numbers formatted as
percetages with 0 decimal places in Excel (22%) appear as 0.2187539 when
merged into Word.


when using OLE DB, but not this one

Also, blank fields in Excel dispay the value zero (0) when
merged in Word.


unless you happen to know that 0 always means that the original entry
was blank.

For the first problem, use Alt-F9 to display the field codes. Suppose
you have

{ MERGEFIELD mypercentage }

Select it, and press ctrl-F9 to surround it with a new pair of field
code braces:

{ { MERGEFIELD mypercentage } }

then insert text until the nested field looks like this:

{ ={ MERGEFIELD mypercentage }*100 \#"0.00" }

Then use Alt-F9 again.

If you see \*Mergeformat in there, delete it.

For the second problem you can change

{ MERGEFIELD mynumber }
to
{ MERGEFIELD mynumber \#"0.00;-0.00;''"}

(or if it is your percentage field that can have blanks, use

{ ={ MERGEFIELD mypercentage }*100 \#"0.00;0.00;''" }

)

However, this will blank /all/ zero values, not just the ones that
started as blank in Excel.

4. One or two people have reported that they have solved their DDE
connection problems by changing their default Windows browser so that
Internet Explorer is not the default. Specifically, they have mentioned
making Firefox the default. I haven't checked this myself. It is
certainly possible for Internet Explorer or a plug-in to interfere with
DDE as a whole.

Peter Jamieson

http://tips.pjmsn.me.uk

On 05/02/2010 02:15, rickcstahl wrote:
My problem is that my Excel data is not being "mail merged" into Word. I
followed the suggestion of prompting the data source before opening and I can
choose "MS Excel Worksheet via DDE (*.xls) when prompted. Next I choose th
named or cell range which is "Entire Spreadsheet". Then in lowr left task
bar it briefly says "Opening file . . . ." but then I am prompted with Word
error "Word was unable to open the data source."

If I try Office 2007 I use "OLE DB Database Files" when prompted to open
data source. Then I select the table "Sheet1$" without any errors. However,
when I Finish& Merge, the data merged into Word look different than what it
should and how it appears in Excel. Specifically, numbers formatted as
percetages with 0 decimal places in Excel (22%) appear as 0.2187539 when
merged into Word. Also, blank fields in Excel dispay the value zero (0) when
merged in Word.

Any help to correct this is greatly appreciated.