Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.word.mailmerge.fields
|
|||
|
|||
merge from Access
OS is XPPro, Access2002 and Word2002. Access has msword.olb library
registered. Is it possible for my access code to find a file, rename it and save it, locate the source, and then not format the word document? A sample of the formatting code is below. I'd really appreciate some help here. Thanks. WApp.Selection.Find.ClearFormatting Dim rngDocument As Object ''Find each instance of BLD and make entire paragraph bold, then delete "BLD" Set rngDocument = WApp.ActiveDocument.Range With rngDocument.Find .ClearFormatting .Replacement.ClearFormatting .Text = "BLD" .Forward = True .Wrap = 0 'wdFindStop .Format = False .MatchCase = True .MatchWholeWord = False .MatchWildcards = False .MatchSoundsLike = False .MatchAllWordForms = False .Execute While .Found rngDocument.Paragraphs.First.Range.Font.Bold = True rngDocument.Paragraphs.Alignment = wdAlignParagraphCenter 'my addition for centering rngDocument.Delete rngDocument.MoveEnd 6 'wdStory .Execute Wend End With -- Burt |
#2
Posted to microsoft.public.word.mailmerge.fields
|
|||
|
|||
merge from Access
Hi ?B?QnVydEFya2lu?=,
OS is XPPro, Access2002 and Word2002. Access has msword.olb library registered. Is it possible for my access code to find a file, rename it and save it, locate the source, and then not format the word document? I'm not sure I understand the question (did you mistype the part about "not format the word document"?)... But in general terms, yes. It's not clear what you mean by "find a file", but this sounds like you want some of the basic file management you can do in Windows Explorer? In Office VBA, you can either use the old commands, like Dir and Name to manipulate files. Or you can use FileSystemObject (FSO) that's part of the Microsoft Scripting Runtime library (Tools/References). Or are you talking about OPENING a document and using FILE/SAVE AS to give it another name? What do you mean by "locate the source", specifically? Cindy Meister INTER-Solutions, Switzerland http://homepage.swissonline.ch/cindymeister (last update Jun 8 2004) http://www.word.mvps.org This reply is posted in the Newsgroup; please post any follow question or reply in the newsgroup and not by e-mail :-) |
#3
Posted to microsoft.public.word.mailmerge.fields
|
|||
|
|||
merge from Access
Thanks for replying, and Happy Holidays.
The code I'm using, in Access, is supposed to locate a file (template), merge data into it, then save it with a new name, and then perform some formatting functions on the new Word doc. The code works on my client's system (using Office 2003) and worked on my old machine (before it crashed) using Office 2002. The installation on my new computer is using my original--wait a minute!!! There's an upgrade-SP3-for Office. I tested it and what was inexplicable is now as clear as a bell!! Thanks to your response, I was led to an epiphany of sorts which solved my problem. Yes, Cindy, there IS a Santa Claus. I am a very happy and rieved camper today. -- Burt "Cindy M -WordMVP-" wrote: Hi ?B?QnVydEFya2lu?=, OS is XPPro, Access2002 and Word2002. Access has msword.olb library registered. Is it possible for my access code to find a file, rename it and save it, locate the source, and then not format the word document? I'm not sure I understand the question (did you mistype the part about "not format the word document"?)... But in general terms, yes. It's not clear what you mean by "find a file", but this sounds like you want some of the basic file management you can do in Windows Explorer? In Office VBA, you can either use the old commands, like Dir and Name to manipulate files. Or you can use FileSystemObject (FSO) that's part of the Microsoft Scripting Runtime library (Tools/References). Or are you talking about OPENING a document and using FILE/SAVE AS to give it another name? What do you mean by "locate the source", specifically? Cindy Meister INTER-Solutions, Switzerland http://homepage.swissonline.ch/cindymeister (last update Jun 8 2004) http://www.word.mvps.org This reply is posted in the Newsgroup; please post any follow question or reply in the newsgroup and not by e-mail :-) |
#4
Posted to microsoft.public.word.mailmerge.fields
|
|||
|
|||
merge from Access
Hi Burt
wait a minute!!! There's an upgrade-SP3-for Office. I tested it and what was inexplicable is now as clear as a bell!! Thanks to your response, I was led to an epiphany of sorts which solved my problem. Yes, Cindy, there IS a Santa Claus. Yes, you see my pointy ears :-) Glad to have made your holidays happier. Cindy Meister |
Reply |
Thread Tools | |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Merge Access OLE Photo to Word | Mailmerge | |||
New problem - merge Word 2002 and Access 2002 par query | Mailmerge | |||
mail merge - Access 2000 and Word 2000 | Mailmerge | |||
why word 2000 mail merge opens multiple instances of access table. | Mailmerge | |||
Word mail merge with Access | Mailmerge |