Andy007 Posted January 11, 2009 Posted January 11, 2009 Hi All, I am finding my word merge program is caching my datasource and my autoit program is not overriding this cached value. Here is a few lines from my autoit program to reset the datasource: $mm = $wd.Activedocument.MailMerge $mm.OpenDataSource ('"' & $data & '"', 0, true, true, true, false, "", "", false) Where $wd is my word object and $data is my new csv data file. Any help would be greatly appreciated. Word2003/2007+WinXP/Vista Regards,Andy (no, the other one)
StSchnell Posted January 21, 2009 Posted January 21, 2009 Hello Andy, is it possible that Word hold the connect to the source and your program want to change it? Try the command Word.Application.Activedocument.MailMerge.MainDocumentType = wdNotAMergeDocument to close an open connection. Hope it helps. Cheers Stefan P.S. wdNotAMergeDocument = -1 Meet me at XING Visit my private homepage Visit my commercial homepage Look at my book inter alia about AutoIt and SAP
Andy007 Posted February 1, 2009 Author Posted February 1, 2009 Thanks Stefan, Did not work for me... I tried about 10 variations but no good. Any other ideas? Regards,Andy (no, the other one)
Andy007 Posted March 7, 2009 Author Posted March 7, 2009 Does anyone else have this problem, or am I alone... All alone. . . Regards,Andy (no, the other one)
Andy007 Posted July 6, 2009 Author Posted July 6, 2009 I think I have it working now. I had to re-install MS Office. Regards,Andy (no, the other one)
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now