G
Guest
I have been trying to work through Cindy Meister's example of using VBA to
send data from Access to word. I wish to push a customer into a form letter
with a list of procedures that they wish to have performed. I have been
slowly editing her code (to be honest, most of what is going on is about my
head, but I have made some progress) to fit my variables, etc.
However, I end up with very strange errors that stop the code execution.
During the AdrInfo() subroutine, the following line gives me errors:
objWord.Selection.Goto What:=Word.wdGoToBookmark, Name:="txtOfferList"
stating that "Word" in the What:=Word.wd... is not defined. I don't
understand! It works fine in her examples, even when coverted to 2000 or
2002 (my original database is in 2000). If I remove the entire What:=...
portion, the code will run and seems to perform properly. Doing this, I am
able to effectively transfer the customer's address info into word.
I'm not sure why that command would give a problem. I did look into the
"resources" in VBA and changed the ActiveX from 2.1 to 2.5 which has altered
some of the errors slightly (letting the "Write Offer" code run further).
Any ideas? Any help would be greatly appreciated.
Brian
send data from Access to word. I wish to push a customer into a form letter
with a list of procedures that they wish to have performed. I have been
slowly editing her code (to be honest, most of what is going on is about my
head, but I have made some progress) to fit my variables, etc.
However, I end up with very strange errors that stop the code execution.
During the AdrInfo() subroutine, the following line gives me errors:
objWord.Selection.Goto What:=Word.wdGoToBookmark, Name:="txtOfferList"
stating that "Word" in the What:=Word.wd... is not defined. I don't
understand! It works fine in her examples, even when coverted to 2000 or
2002 (my original database is in 2000). If I remove the entire What:=...
portion, the code will run and seems to perform properly. Doing this, I am
able to effectively transfer the customer's address info into word.
I'm not sure why that command would give a problem. I did look into the
"resources" in VBA and changed the ActiveX from 2.1 to 2.5 which has altered
some of the errors slightly (letting the "Write Offer" code run further).
Any ideas? Any help would be greatly appreciated.
Brian