Julie A. Alley
juliea at eccs-seattle.com
Thu Mar 13 19:04:01 CST 2003
Ok, I will try that - thanks Julie Alley -----Original Message----- From: MartyConnelly [mailto:martyconnelly at shaw.ca] Sent: Thursday, March 13, 2003 2:39 PM To: accessd at databaseadvisors.com Subject: Re: [AccessD] Question about Sending RTF to Word and bolding specific text Wildeyed Guess Are you creating more than one version of word application when you run this code and running out of memory You need to use the CreateObject() if Word is not open. So Test for set appword= GetObject("Word.Application") If Err.Number = 492 Then set appword= CreateObject("Word.Application") Julie A. Alley wrote: > I am using the following code to send a report to Word, then conduct a > search and replace for the search phrase used to create the report. > > The problem: This only works once, then I have to reboot in order for > it to work again.... Any one know a reliable way to do this repetitively? > > Search, send results to word, then bold the search phrases. > > Thanks, > > > > DoCmd.RunCommand acCmdOutputToRTF > > With Selection.Find > .ClearFormatting > With .Replacement > ' .ClearFormatting > .Font.Name = "Arial" > .Font.Size = 24 > .Font.AllCaps = True > .Font.Bold = True > End With > .Forward = True > .Wrap = wdFindContinue > .Execute FindText:=strCriteria(0), _ > Replace:=wdReplaceAll, ReplaceWith:=Trim(strCriteria(0)) > End With > > > Julie Alley > Emerald City Computer Solutions, Inc. > > Juliea at eccs-seattle.com <mailto:Juliea at eccs-seattle.com> > > Cell: 206-235-0954 > Office: 206-932-6618 > Fax: 206-938-7941 > Web site: http://www.eccs-seattle.com <http://www.eccs-seattle.com/> > > WARNING: The information contained in this e-mail is confidential. > The information is intended only for the use of the individual or > entity to whom it is addressed. If you are not the intended > recipient, or the employee or agent responsible for delivering it to > the intended recipient, you are hereby notified that any use, > dissemination, distribution or copying of this communication is > strictly prohibited. If you have received this e-mail in error, > please immediately notify us by a collect telephone call > to 206.932.6618 and return the original message to us by e-mail. > Thank you. > _______________________________________________ AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com