Microsoft Word - Datasource not being released after an automated mail merge
Asked By Andrew Lockwood on 06-May-12 06:17 PM
I am pulling my hair out over this one!
I have written a macro which merges a Word template with a .csv file created in another program. The merge works fine, but the datasource file remains locked by Word, so I cannot create a new .csv file until I have closed all open documents in Word (not just the one I have created by the merge). This is a major headache when wanting to create multiple documents in succession.
With ActiveDocument.MailMerge
.OpenDataSource _
Name:="d:\documents and settings\shared\word invoice.csv"
.Destination = wdSendToNewDocument
.SuppressBlankLines = True
With .DataSource
.FirstRecord = wdDefaultFirstRecord
.LastRecord = wdDefaultLastRecord
End With
.Execute Pause:=False
.DataSource.Close
End With
Any hints / suggestions as to why Word is keeping the datasource file locked would be much appreciated.
[)ia6l0 iii replied to Andrew Lockwood on 07-May-12 12:38 PM
How about activedocument.close after the mail merge?
With ActiveDocument.MailMerge
....
End With
ActiveDocument.Close()
Somesh Yadav replied to Andrew Lockwood on 08-May-12 02:32 AM
try this,
http://www.ehow.com/how_11129_set-mail-merge.html
Microsoft Word Document Merging Word
I have existing documentation, an Instructor Guide and a Participant Guide. I need to merge them in by some automated means so the pages align numerically. Page one of the Instructor guide as the first the pages are facing each other. Can this be done? If so, how? Thanks!!!!! - - Chuck Word Page Layout Discussions Microsoft Word (1) PageSetup (1) BuiltInDocumentProperties (1) AcceptAllRevisions (1) BottomMargin (1) RightMargin (1) LeftMargin (1) WdPropertyPages (1 you wish to avail yourself of my services on a paid consulting basis. Doug Robbins - Word MVP keywords: Microsoft, Word, Document, Merging description: I have existing documentation, an Instructor Guide and
Stripping hyperlinks Word
Word 2007 inexplicably started stripping all hyperlinks, email addresses and other automated information a few months ago, and I cannot find anything in the "Wor Options" sections an example, a link such as www.yahoo.com will appear as {HPERLINK Please help!! Word Document Management Discussions Microsoft Word (1) Word 2007 (1) BlomMicrosoft (1) Alt (1) HPERLINK (1) Months (1) Press Alt+F9 to hide field codes. - - Stefan Blom Microsoft Word MVP Try typing:- ALT + F9 I think that will resolve the problem for you
word cannot start the converter mswrd632.wpc Word
We have a automated Word mailmerge application written in VS. After a recent security upgrade we are getting this error: word cannot start the converter mswrd632.wpc When I search support for this issue, it says the problem is caused by opening a wordpad document with Word, but we are not using any wordpad documents. Any suggestion how to get around this error? Word Mail Merge Fields Discussions Office 2007 (1) Word (1) KBArticle (1) MSOffice (1) Wordonenotesupport (1) Mailmerge (1) Convertor (1) Fallsback (1) Remove the
Automate Filling Out Multiple Forms in Microsoft Word Word
I have no experience with any of the behind-the-scenes in Word, so bear with me. I'm working for a patent office, and there is one particularly time- consuming task that I think should be automated- -trouble is, I'm not sure how. For every new application, we have to fill and correctly formatting the text into each form. This is stupid. Surely it can be automated, can't it? I tried simply recording a macro where I copy-pasted from the out all the information once- -inventor's name, docket number, filing date, etc. and have Microsoft Word automatically put the information in the correct space on each form and format it. Oh
I need to automatically stitch a word that's all capped. Any suggestions? Here's how it should look: T-R-I hard hyphens so as not to separate at the end of a line. . . please help. Word Application Errors Discussions Word (1) Barnhill (1) Fairhope (1) Alabama (1) Word.application.errors (1) Hyphens (1) Presumably you're looking for some automated solution as opposed to just typing it with nonbreaking hyphens? - - Suzanne S. Barnhill Microsoft MVP (Word) Words into Type Fairhope, Alabama USA Word MVP FAQ site: http: / / word.mvps
Problem with hyperlink behavior in Word template form Word
Microsoft Word 2007, Windows 7: Template form In a nutshell: Hyperlinks go to the correct page, but blank field, or is there a solution? Thanks in advance for any help. MAC Office Word Discussions Microsoft Word (1) Word 2007 (1) Windows 7 (1) Word (1) “HowToPublishEbooks” (1) “TableofContents (1) WordMac (1) GoTo (1
Microsoft Macro Conversions from Word 2003 to Word 2007 Word
Is there a way for Microsoft Word to automatically convert macros from Word 2003 format to Word 2007 format, so that we don???t have to rewrite each macro by hand? Also
Microsoft Excel Triggers Microsoft Word Excel
Good morning. Here's what I'd like to accomplish. I have forty templates stored in word in the same file path. Each template is static, except for one line which will user types into an excel workbook. The user will also use excel to select which word templates they wish to print. A Table of Contents will be created in word that identifies specifically which word templates were selected in excel. All selected word templates, as well as the automated Table of Contents, should print as one print batch
Image Importer Wizard PowerPoint
Hello: I have a large Microsoft Word file containing mostly graphics but with some intermittent text scattered throughout the document. I am looking for a technique to export my word file to a power point file in such a way that each of the graphics in the Word document shows up as a graphic on a different PowerPoint slide. Also the text beneath called Image Importer Wizard. This application does a great Job of exporting the graphics from Microsoft Word to Microsoft Power Point slides. However the text below each graphic in Word seems to be ignored & NOT transferred to the Notes section of the PowerPoint slide. * How