macros from Word97 VB do not work under XP

D

Dorien Postma

I use a macro which does the following: It alters the lay-
out of a selected figure. I made the macro by recording in
Word97 (see below). This macro worked fine under
WindowsNT, but not with Windows XP. I get the following
message:
an error occured in a Microsoft Word for Windows 97
application file. There is an option for sending an error
report to Microsoft (which I have done). If I close this
window, a fatal error occurs, and Word is closed.
Anybody any ideas?

Selection.ShapeRange.Fill.Visible = msoFalse
Selection.ShapeRange.Fill.Transparency = 0#
Selection.ShapeRange.Line.Weight = 0.75
Selection.ShapeRange.Line.DashStyle = msoLineSolid
Selection.ShapeRange.Line.Style = msoLineSingle
Selection.ShapeRange.Line.Transparency = 0#
Selection.ShapeRange.Line.Visible = msoFalse
Selection.ShapeRange.LockAspectRatio = msoTrue
Selection.ShapeRange.Height = 74.55
Selection.ShapeRange.Width = 453.55
Selection.ShapeRange.PictureFormat.Brightness = 0.5
Selection.ShapeRange.PictureFormat.Contrast = 0.5
Selection.ShapeRange.PictureFormat.ColorType =
msoPictureAutomatic
Selection.ShapeRange.RelativeHorizontalPosition = _
wdRelativeHorizontalPositionColumn
Selection.ShapeRange.Left = CentimetersToPoints(0)
Selection.ShapeRange.LockAnchor = False
Selection.ShapeRange.WrapFormat.Type = wdWrapNone
Selection.ShapeRange.WrapFormat.Side = wdWrapBoth
Selection.ShapeRange.WrapFormat.DistanceTop =
CentimetersToPoints(0)
Selection.ShapeRange.WrapFormat.DistanceBottom =
CentimetersToPoints(0)
Selection.ShapeRange.WrapFormat.DistanceLeft =
CentimetersToPoints(0.32)
Selection.ShapeRange.WrapFormat.DistanceRight =
CentimetersToPoints(0.32)
Selection.ShapeRange.ZOrder msoSendToBack
End Sub
 
J

Jezebel

Forget XP and switch to one of the MS operating systems that actually works.
Or throw out all your old code and start again (which is what MS wants you
to do).
 
G

Guest

Unfortunately, I can not forget XP, since my company
decided to use XP. If you mean by throwing out the old
code and start again, this is what I did! I recorded the
macro again on the computer with XP en Word97. This still
doesn't help.
So I need more suggestions!
 

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