Word97 macros won't work on XP

E

Ed

We have some macros that worked fine with Word 97 in Win 95. Now some
computers have upgraded to Office XP with Win XP, and the macros won't work.
They look like VBA, not Word Basic, and I'm at a total loss (not that I had
much to lose!). I've copied the first one of the string below - if anyone
can help get these going again, I'd appreciate it.

Ed

Attribute VB_Name = "NewMacros"
Sub sac()
Attribute sac.VB_Description = "Macro recorded 10/31/00 by Linda Freeman"
Attribute sac.VB_ProcData.VB_Invoke_Func = "Normal.NewMacros.sac"
'
' sac Macro
' Macro recorded 10/31/00 by Linda Freeman
'
Selection.Find.ClearFormatting
With Selection.Find
.Text = "ITEM ID"
.Replacement.Text = ""
.Forward = True
.Wrap = wdFindContinue
.Format = False
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute
Selection.HomeKey Unit:=wdLine
Selection.TypeParagraph
Selection.InsertBreak Type:=wdPageBreak
Selection.MoveDown Unit:=wdLine, Count:=2
End Sub
 
D

Doug Robbins - Word MVP

Hi Ed,

Tell us what the macro was intended to do

Please post any further questions or followup to the newsgroups for the
benefit of others who may be interested. Unsolicited questions forwarded
directly to me will only be answered on a paid consulting basis.

Hope this helps
Doug Robbins - Word MVP
 
E

Ed

Each macro, when run, will start at the beginning of the document, find a
specified text string, and then perform an action - the one pasted in my
original post found the text string, went to the beginning of that line, and
inserted a page break.

I personally did not use these macros - they were used by our Wrod
Processing group. I dropped them into my machine (Office/Windows 2000), and
the first thing I noticed was the "Attribute" lines in red. I commented
them out, and the macro ran - but only one time. I can't get it to run from
the top of the document to the bottom and do the actions.

Ed
 
E

Ed

Doug -please see my response to your reply on my later post about stopping
at the end of a page. That was a problem I ran into trying to work around
this one. I think your assist on the other issue has helped solve this one,
unless there is a known or clear and obvious reason why the 97 code wouldn't
run on XP.

Thanks for all your help.
Ed
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top