Andy Lacey
andy at minstersystems.co.uk
Wed Mar 2 07:11:01 CST 2005
Virginia I suggest you set the merge data of your doc to a temp table or a query rather than direct to a main table. If a temp table you write the required record to the tabel before opening the doc, then do the mailmerge. If you base the doc on a query you ensure with the query's criteria that it uses the right record. Either way the doc will then just open to the right record. -- Andy Lacey http://www.minstersystems.co.uk --------- Original Message -------- From: Access Developers discussion and problem solving <accessd at databaseadvisors.com> To: accessd at databaseadvisors.com <accessd at databaseadvisors.com> Subject: [AccessD] Access to Word Merge Date: 02/03/05 13:57 > > I am using the below code to open a Word document. The user wants to use a > Word document for the printed form. So I am trying to create a Mail Merge > with the EquipSpec.doc. > > > > Is there a way to use this same code but include something that will open > the Word document to the current record? > > > > Sort of like using the OpenReport to a certain record: > > DoCmd.OpenReport stDocName, acPreview, , "[EquipSpecID]=" & > Me![EquipSpecID] > > > > Virginia > > > > *********************************************** > > Function GoToEquipSpecForm() > > 'Opens Spec Word document > > Dim objWord As Object > > > > Set objWord = CreateObject("Word.Application") > > objWord.Visible = True > > > > objWord.Documents.Open "C:Documents and SettingsDesktopEQIPSPEC.doc", , > True > > > > Set objWord = Nothing > > > > End Function > > -- > AccessD mailing list > AccessD at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/accessd > Website: http://www.databaseadvisors.com > > > > > ________________________________________________ Message sent using UebiMiau 2.7.2