Home |
Search |
Today's Posts |
|
#1
![]() |
|||
|
|||
![]()
This is a repeat of a problem I have had solved for me before - by Peter Jamieson, back in March. The problem has recurred in another system. Here is the code: -
strCurrentFileName = CurrentDb.Name Set objApp = CreateObject("Word.Application") objApp.Visible = False 'objApp.Activate 'Set objMMMD = objApp.Documents.Open(FileName:=strDocName) objApp.Documents.Open FileName:=strDocName, ConfirmConversions:=False, _ ReadOnly:=False, AddToRecentFiles:=False _ , PasswordDocument:="", _ PasswordTemplate:="", Revert:=False, WritePasswordDocument:="", _ WritePasswordTemplate:="", XMLTransform:="" objApp.ActiveDocument.MailMerge.OpenDataSource Name:= _ "C:\MIBnew2\empty.odc", _ ConfirmConversions:=False, ReadOnly:=False, LinkToSource:=True, _ AddToRecentFiles:=False, PasswordDocument:="", PasswordTemplate:="", _ WritePasswordDocument:="", WritePasswordTemplate:="", Revert:=False, _ Connection:= _ "Provider=Microsoft.Jet.OLEDB.4.0;Password=""pixie 7826"";" & _ "User ID=Murray M-R;Date Source=" & strCurrentFileName & ";" & _ "Mode=Read;Jet OLEDB:System database=\\Dove4\MIBnew2\Security1.mdw;" _ , SQLStatement:="SELECT * FROM `mergetable`", SQLStatement1:="", _ SubType:=wdMergeSubTypeAccess This is where the pop up appears asking for input, quoting the user name and password set in the code above. I realise that I have made a mistake somewhere, but I cannot see it for looking! The empty.odc file was constructed by using Notepad as Peter suggested. Murray |
#2
![]()
Posted to microsoft.public.word.mailmerge.fields
|
|||
|
|||
![]()
Of the top of my head, try changing
"User ID=Murray M-R;Date Source=" & strCurrentFileName & ";" & to "User ID=Murray M-R;Data Source=" & strCurrentFileName & ";" & There could be other stuff but I'm glazing over right now! Peter Jamieson http://tips.pjmsn.me.uk On 20/11/2009 20:22, Murray Muspratt-Rouse wrote: "User ID=Murray M-R;Date Source="& strCurrentFileName& ";"& |
#3
![]() |
|||
|
|||
![]() Quote:
You have done it again! As I said i could not see for looking. The problem was finally solved when I found that someone had made the MIBnew 2 folder 'Read only' Now I go back to worrying about problems on my own PC. Thanks again Murray |
Reply |
Thread Tools | |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Word 2000 fails DDE connection to Excel data | Mailmerge | |||
Insert Field Database only fails when I try to use filters | Mailmerge | |||
How do I establish an OLE DB connection for an mde database? | Mailmerge | |||
ODBC connection Works w/Excel Fails w/Word | Mailmerge | |||
mailmerge from access database using DDE connection? | Mailmerge |