Quote:
Originally Posted by gmaxey
This is a strange issue that I am certainly unable to explain.
|
Likewise.
However, given that the code works much better with a new document, perhaps the following could serve as the basis for a workaround:
Code:
Sub MesureDureebis()
Application.ScreenUpdating = False
Dim i As Long, Boite As Shape, Debut As Date, DocTmp As Document, Rng As Range
Debut = Time
Set Rng = Selection.Range
Set DocTmp = Documents.Add
With DocTmp
For i = 1 To 500
Set Boite = .Shapes.AddShape(msoShapeRectangle, 4 * i, 72.75, 4, 19.5)
Boite.Fill.ForeColor.RGB = RGB(2 * i, 2 * i, 2 * i)
Next i
Rng.FormattedText = .Range.FormattedText
.Close False
End With
Application.ScreenUpdating = True
MsgBox CStr((Time - Debut) * 24 * 3600) & " s"
End Sub