Edward S Zuris
edzedz at comcast.net
Thu Jun 19 17:53:07 CDT 2008
Maybe this will help. One clue is to turn on the MS Word Macro recorder for Word 2000 and analyze some Word VBA for a task. That and Google I was able to teach myself on how to do the following. = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = Concatenate Word Document files in Access 2000 VBA = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = ' ***************************************************** ' Merge Boiler Plate file Info ' sTmp1 = Trim$(rsBoil![zPath] & " ") sTmp2 = Trim$(rsBoil![zFileName] & " ") sTmp0 = sTmp1 & "/" & sTmp2 ' ***************************************************** ' Let Customer know what is going on ' DoCmd.Echo True, " Processing Boiler Plate: " & sTmp2 & " " & CStr(Now()) ' ***************************************************** ' Concatenate *.doc files, adding new sections ' to the bottom of the new word document ' objWd1App.Selection.InsertFile FileName:=sTmp0, Range:="", _ ConfirmConversions:=False, Link:=False, Attachment:=False = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = Stuffing data in a form field / Word Bookmark = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = ' ***************************************************** ' Get Data to merge with a Bookmark \ Form Field ' sBookData = "" sBookMark = "" sBookMark = rsBook![BookMark] sBookData = rsBook![ShowInDoc] ' ***************************************************** ' Jump to the desired Bookmark ' objWd1App.Selection.GoTo What:=wdGoToBookmark, Name:=sBookMark ' ************************************************ ' Stuff data into the desired Bookmark ' sBookData = sBookData & Space(1) objWd1App.Selection.TypeText Text:=CStr(sBookData) = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com]On Behalf Of Shamil Salakhetdinov Sent: Thursday, June 19, 2008 6:37 AM To: 'Access-D' Subject: [AccessD] MS Word - Copy and Paste contents of compound IF mergefield... Hi All, I have got stuck here - I have to do the following in VBA code Context ======= - I have an MS Word document with IF Merge field having other MS Word fields as its content Task ==== - Copycat contents of the compound IF merge field including all (sub-)fields, formats etc. but do not copy "parent" IF merger field ========= It should be possible to do simple way somehow as far as I may guess - trying to find this simple solution here but not yet found it so far... Any hints, tips & tricks would be very welcome here! Thank you. -- Shamil -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com