Reply
 
Thread Tools Display Modes
  #1   Report Post  
Cindy M -WordMVP-
 
Posts: n/a
Default

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

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Mail Merge Word 2003 Issue S.Nicks Mailmerge 5 February 20th 09 01:55 AM
Macros - Keyboard Commands Janet Microsoft Word Help 6 April 11th 05 05:28 AM
Wordperfect Office 2000 conversion to Word 2003 MikeE New Users 1 March 21st 05 12:04 AM
How do I create & merge specific data base & master documents? maggiev New Users 2 January 12th 05 11:30 PM
Word 2002 Mail Merge - merging to new doc displays blank empty dia Steve Vincent Mailmerge 1 December 15th 04 06:28 PM


All times are GMT +1. The time now is 05:58 PM.

Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 Microsoft Office Word Forum - WordBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Word"