![]() |
#18
|
||||
|
||||
![]()
Likewise.
A workaround that might be useful given the apparent speed improvement with new documents, would be to create a new document, generate the shapes there, then replicate them (e.g. via FormattedText) in the target document: Code:
Sub MesureDureebis() Dim i As Long, Boite As Shape, Debut As Date, DocTmp As Document, Rng As Range Debut = Time Application.ScreenUpdating = False 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
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
![]() |
mhagi | Word VBA | 2 | 10-16-2015 12:21 AM |
![]() |
User12344321 | Word | 4 | 09-21-2015 12:54 PM |
All Shapes on slide | excelledsoftware | PowerPoint | 9 | 09-15-2013 04:03 AM |
![]() |
SueK | PowerPoint | 1 | 01-20-2011 04:30 AM |
My Shapes some appear some don't | Jean-Paul | Visio | 0 | 03-01-2006 01:38 AM |