officexp Acces/Word vba

ron2

Registered User.
Local time
Today, 02:05
Joined
Sep 8, 2002
Messages
12
My client has 14 workstations
1 has office 2000, 5 have office 2002, 8 have office 2003

Of the 5 that have office 2002 (XP) 3 have Publisher installed

Recently needed to introduce code to change format of some words in a Word document
all well except with the workstations with OfficeXP and Publisher installed ~ then Access crashes when it
reaches the line with .Text = "Kind regards"

>>>>>>>
Dim myword As Word.Application
Set myword = New Word.Application

With myword.Application

.......deals with some other stuff and saves document = ok

'deals with format
.Selection.WholeStory

With .Selection.ParagraphFormat
.SpaceBeforeAuto = False
.SpaceAfterAuto = False
.LineSpacingRule = wdLineSpaceExactly
.LineSpacing = 12
.CharacterUnitLeftIndent = 0
.CharacterUnitRightIndent = 0
.CharacterUnitFirstLineIndent = 0
.LineUnitBefore = 0
.LineUnitAfter = 0
End With

'finds "Kind regards" on 1st or maybe subsequent page
.Selection.Find.ClearFormatting
With .Selection.Find

.Text = "Kind regards"

.Replacement.Text = ""
.Forward = True 'go find on following pages
.Wrap = wdFindContinue
.Format = False
.MatchCase = True
.MatchWholeWord = True
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With

.....sub goes on
<<<<<<<<<

I have installed Office2002 (with publisher) on my windows2000 machine and Service Pack 3 clears up the problem

However at my client's workstation/s (WinXP(professional) and Service Pack 3 does NOT clear up the problem
Note that the code runs ok on all other machines at my client

Anyone have experience of this type of issue arising with Publisher and how to fix it
Any ideas would be welcome

thanks
 

Users who are viewing this thread

Back
Top Bottom