Link to home
Start Free TrialLog in
Avatar of BillPowell
BillPowell

asked on

Access 2003 - create a registry entry

Office 2003 is abound with new security features, most of which make office 2000 users quite annoyed.  One in particular with Microsoft Word performing mail merges.  I have several mail merges that were working fine in 2000 that because of 2003 new security set up, they dont work.  Not only dont they work, but when attempting to open the document on a 2003 machine, it will destroy the fact that its a mail merge document, so that even the 2000 machines cant use it.

Luckily I found a solution to that problem here:

http://support.microsoft.com/?kbid=825765

It involves a registry entry and everything works very smoothly after making it.  The problem is that the key is HKEY_CURRENT_USER so is different for every user on the same machine.  Just when I think Ive made the registry entry on every users computer or every windows login, I am away for a couple of days and a new user or computer accesses it, wrecks the document and makes it unusable until I get back to fix it.

Anyways to make a long story short, since I automate these merges from access, I was thinking that on startup, I would check to see what office version the user was using, and if its 2003 then check for the existence of this key, and if it doesnt exist, make that entry in code.  However I have no experience manipulating the registry in code.  Perhaps someone could walk through it with me.

Regards,

Bill
Avatar of SidFishes
SidFishes
Flag of Canada image

this isn't an answer but you might want to put a pointer to this in the VB forum...they're probably a bit more used to messing about in the registry...
Avatar of BillPowell
BillPowell

ASKER

Ok LSM, Ive got the download and corrected the code as per your posting.  I know how to find out which version of Office the user has.  Can you give me a basic rundown of how to use that code given that I need to create the registry entry of:

HKEY_CURRENT_USER\Software\Microsoft\Office\11.0\Word\Options

"SQLSecurityCheck"=dword:00000000
Hey LSM, you still out there.  Ive been messing with your code a bit and ran into a bit of a hangup.  I can check for the existance of the Key "SQLSecurityCheck", but in this case I need to create a new DWord Value.  Im  not sure what the difference is, I just did not see a place in your code to specify this.

Im raising the points in case this gets real difficult.
Oh wait, Im already at 500.
Not sure about DWord values ... I'll have to check on those
ASKER CERTIFIED SOLUTION
Avatar of Scott McDaniel (EE MVE )
Scott McDaniel (EE MVE )
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Sorry to leave this so long.  I was on vacation.  I have tried this code out and it works like a charm.  Thank you so much.  Just one thing though, I have noticed that this code will create the key with these parameters

RegWrite "Software\Microsoft\Office\11.0\Word\Options", "SQLSecurityCheck", "00000000", HKEY_CURRENT_USER, DWordType

Does it hurt anything to keep writing the same key over and over, or would you recommend testing for the existence of that key first?
Thanks again, these functions have already come in handy for a variety of other things.