Home |
Search |
Today's Posts |
|
#1
|
|||
|
|||
Hi ?B?RWQgQg==?=,
1. When you open a mail merge document using VBA, in Word 2002 with SPs installed or any Word 2003, as in the code here, the data source link is removed. Unless you change the Registry key. 2. This "security feature" is actually ridiculous. The only SQL a Word mail merge can execute is a SELECT statement. And in order to do that, it has to find the data source file in EXACTLY the same path as when the main merge document was set up. The chances that someone external can send you such a combination that will, in addition, be ABLE to execute something "bad" are so small that I would have no qualms about allowing this Registry key change. But if your IT people use knee-jerk reactions instead of thinking through and evaluating problems, then you probably have no chance. 3. This means, your macro code would also have to ATTACH the data source to the main merge document, after opening it. And that means you have to record attaching to the data source in a macro, as well. And no guarantees that will work 100%, but we can try. 4. The numbers I gave you are the real values behind the wd... things. I gave you those to make sure the problem had nothing to do with your VBA code, but was purely a question of the actions of this security measure. 5. And, before you ask, no, there's no reliable way to use the SendKeys method you had before in Word 2002/2003. The interface changed. SendKeys dupicates your exact keystrokes, and the commands it was using before aren't there anymore. I don't have the ability to change the registry keys on my computer as I am not an administrator, also, this would have to be done on a number of computers that are trying to use this routine (nine associates use the database and prepare letters automatically from it). I don't believe our company policy on security would allow the change of the registry keys anyway. I can open the Standard document from within Word and connect to the database and the letter will merge with the proper data table in the access database. I don't understand what you want me to substitute the numbers for in the three lines . 0 should be substituted for what? I apologize if I sound dumb, but I am not that familiar with VBA code. Cindy Meister INTER-Solutions, Switzerland http://homepage.swissonline.ch/cindymeister (last update Jun 8 2004) http://www.word.mvps.org This reply is posted in the Newsgroup; please post any follow question or reply in the newsgroup and not by e-mail :-) |
Reply |
Thread Tools | |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Mail Merge Word 2003 Issue | Mailmerge | |||
Macros - Keyboard Commands | Microsoft Word Help | |||
Wordperfect Office 2000 conversion to Word 2003 | New Users | |||
How do I create & merge specific data base & master documents? | New Users | |||
Word 2002 Mail Merge - merging to new doc displays blank empty dia | Mailmerge |