Reply
 
Thread Tools Display Modes
  #1   Report Post  
Posted to microsoft.public.word.mailmerge.fields
BurtArkin
 
Posts: n/a
Default 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   Report Post  
Posted to microsoft.public.word.mailmerge.fields
Cindy M -WordMVP-
 
Posts: n/a
Default 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   Report Post  
Posted to microsoft.public.word.mailmerge.fields
BurtArkin
 
Posts: n/a
Default 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   Report Post  
Posted to microsoft.public.word.mailmerge.fields
Cindy M -WordMVP-
 
Posts: n/a
Default 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

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Merge Access OLE Photo to Word Andy Mailmerge 2 June 8th 05 12:48 PM
New problem - merge Word 2002 and Access 2002 par query Brad Hays Mailmerge 1 June 1st 05 11:52 AM
mail merge - Access 2000 and Word 2000 DawnMKA Mailmerge 1 March 26th 05 11:20 AM
why word 2000 mail merge opens multiple instances of access table. Johnny C. Mailmerge 0 February 3rd 05 05:11 PM
Word mail merge with Access Linda Mailmerge 1 December 7th 04 11:46 PM


All times are GMT +1. The time now is 08:20 PM.

Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 Microsoft Office Word Forum - WordBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Word"