Rocky Smolin at Beach Access Software
rockysmolin at bchacc.com
Thu Jan 24 08:56:42 CST 2008
Dear List: I'm still struggling with this word merge thing. The code I'm looking at I thought was working previously. I cribbed it right out of Balter's Mastering Access 97 Development. I'm using A2K3. No references missing. It's not very much code. strDocName contains a valid document and it actually opens: Dim objWord As Object Set objWord = CreateObject("Word.Application") With objWord 'Visible is set True in order to view the operation. .Visible = True .Documents.Open (strDocName) .ActiveDocument.MailMerge.Destination = wdSendToNewDocument .ActiveDocument.MailMerge.SuppressBlankLines = True .ActiveDocument.MailMerge.Execute End With It blows up on " .ActiveDocument.MailMerge.Destination = wdSendToNewDocument" with an error "Requested Object is not Available". I've had this 'Object Not Available' problem before but due to my advanced age cannot remember what the fix is. Does anyone have a hint why this is failing at that point? MTIA, Rocky -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Arthur Fuller Sent: Wednesday, January 23, 2008 8:15 AM To: Access Developers discussion and problem solving Subject: Re: [AccessD] Mail Merge Helen Feddema's site has lots such things. Her specialty is Office integration. Google will take you there quickly. A. On 1/23/08, Rocky Smolin at Beach Access Software <rockysmolin at bchacc.com> wrote: > > Dear List: > > I need to do a simple Mail Merge Access-->Word and don't want to > reinvent the wheel. Is there a canned routine on line that I could > crib? I checked Lebans but didn't see anything. > > MTIA > > Rocky > > > > > -- > AccessD mailing list > AccessD at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/accessd > Website: http://www.databaseadvisors.com > -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com No virus found in this incoming message. Checked by AVG Free Edition. Version: 7.5.516 / Virus Database: 269.19.8/1236 - Release Date: 1/21/2008 8:23 PM