A
Art Farrell
Hi,
I've been using Excel since 1.1 around '87 and have written many macros.
Earlier this year I set up a macro in Word 2000 to merge various Excel
address lists. Since I know zilch about Word I copied most of the info from
an MS KB article and modified it. I had problems it getting it to pick from
more than one file so I went in this NG and I got this squib of code (from
Cindy Meister, I think):
With Dialogs(wdDialogFileOpen)
iOKCancel = .Display
sUserInput = .Name
End With
and I changed the statement in the macro to:
.OpenDataSource Name:=sUserInput, Connection:="Entire Spreadsheet"
This worked great since I was using it at a community library where I
volunteer and they had W'98 and Office 2000. A month ago they upgraded their
computer system and had to go to new computers with W'XP and Office 2002.
When I tried the macro at their location it wouldn't work, but I could
access the macro. After searching the NG's I thought I had found the
solution. I had to check the "Confirm conversion at Open" box and change the
statement to:
..OpenDataSource Name:=sUserInput, Format:=wdOpenFormatAuto,
SubType:=wdMergeSubTypeWord2000, Connection:="Entire Spreadsheet"
This may not be correct because I went to the library today and opened the
Word MailMerge document. When I actuated the button I had previouly assigned
on the toolbar to start the macro I got the message:
"Could not open macro storage"
I hit ALT-F11 to look at the macro and of course it wasn't there. Since I
came home I looked at NG answers and some KB articles but I'm not
comfortable with what they tell me. The computer has plenty of RAM and I
don't want to reinstall Office since it's not my computer. Is there an
easier way or should I just take the text of the macro and reinstall it in a
module of the Word workbook?
CHORDially,
Art Farrell
I've been using Excel since 1.1 around '87 and have written many macros.
Earlier this year I set up a macro in Word 2000 to merge various Excel
address lists. Since I know zilch about Word I copied most of the info from
an MS KB article and modified it. I had problems it getting it to pick from
more than one file so I went in this NG and I got this squib of code (from
Cindy Meister, I think):
With Dialogs(wdDialogFileOpen)
iOKCancel = .Display
sUserInput = .Name
End With
and I changed the statement in the macro to:
.OpenDataSource Name:=sUserInput, Connection:="Entire Spreadsheet"
This worked great since I was using it at a community library where I
volunteer and they had W'98 and Office 2000. A month ago they upgraded their
computer system and had to go to new computers with W'XP and Office 2002.
When I tried the macro at their location it wouldn't work, but I could
access the macro. After searching the NG's I thought I had found the
solution. I had to check the "Confirm conversion at Open" box and change the
statement to:
..OpenDataSource Name:=sUserInput, Format:=wdOpenFormatAuto,
SubType:=wdMergeSubTypeWord2000, Connection:="Entire Spreadsheet"
This may not be correct because I went to the library today and opened the
Word MailMerge document. When I actuated the button I had previouly assigned
on the toolbar to start the macro I got the message:
"Could not open macro storage"
I hit ALT-F11 to look at the macro and of course it wasn't there. Since I
came home I looked at NG answers and some KB articles but I'm not
comfortable with what they tell me. The computer has plenty of RAM and I
don't want to reinstall Office since it's not my computer. Is there an
easier way or should I just take the text of the macro and reinstall it in a
module of the Word workbook?
CHORDially,
Art Farrell