View Single Post
  #4   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

I would expect DDE to work OK in Windows XP - it is OK here, for
example. But
a. ensure that Excel is listening to DDE conversations (Ensure that
Excel Tools-Options-General-Ignore other Applicaitons is unchecked)
b. it is very easy for DDE conversations to be blocked by a single
badly-behaved program (which is one of the reasons DDE was "deprecated"
many years ago). You can try to ensure that only Word and Excel are open
and see if that makes any difference.

Another way to try to get the data as you see it in Excel is to
Edit-Copy the data from the worksheet and paste it into a Word
document, then use that as the data source. It is more likely to work if
you do not have more columns than Word can have in a table, and/or your
data is quite simple (no multiline data, no "delimiter characters" such
as commas in the data itself.

Peter Jamieson

http://tips.pjmsn.me.uk

On 05/02/2010 13:42, rickcstahl wrote:
Sorry, I am using Windows XP. I did try opening the Excel file first but
this did not work. As far as the zeros being displayed, sometimes I have
zero as an Excel value which I want to appear in Word but other fields in
Excel are blank but when merged show up as zero in Word which I would like to
also be blank and not display the zero value. I am not sure about all of the
zeros in Word that should be there, but I know some originate from blank
fileds formated as either General or Text in Excel. Don't know if this will
make a difference or not with your suggestions to correct the display of zero
in reference to a number. By the way my Windows default is Internet Browser.
Thanks.

"Peter Jamieson" wrote:

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.

.