Set Word template to insert data from database on open (1 Viewer)

Hello1

Registered User.
Local time
Today, 10:22
Joined
May 17, 2015
Messages
271
In access form I have a button which opens my word template document .dot and when that document opens and asks me if I want to run the SQL command (I also want to set that to yes by default so it doesnt show up on open).
When I click on Yes then a pop up window appears and asks me to select the data source. I want to set the data source once so it doesnt ask me always.

Edit: for disabling the SQL warning I found this on microsofts website
Code:
Word 2007
HKEY_CURRENT_USER\Software\Microsoft\Office\12.0\Word\Options 

"SQLSecurityCheck"=dword:00000000
Start Registry Editor.
Locate and then click the following registry key:
HKEY_CURRENT_USER\Software\Microsoft\Office\12.0\Word\Options
On the Edit menu, point to New, and then click DWORD Value.
Under Name, type:
SQLSecurityCheck
Double-click SQLSecurityCheck.
In the Value data box, type:
00000000
Click OK.
Is there another way or only this one? And yeah, Im using Office 2007

Thanks
 

Hello1

Registered User.
Local time
Today, 10:22
Joined
May 17, 2015
Messages
271
I managed it through the step by step mail merge wizard. Just added the table and saved but had to do it in office 2016, 2007 was crashing when I choose the database for some reason.
Now only whats left is to edit the registry but I dont like that workaround tho. Would like only this document (actually database) to be the exception for that prompt, I mean to not have that prompt and have yes by default.
 

Users who are viewing this thread

Top Bottom