Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

CreateSelection in Loop bug???

Status
Not open for further replies.

Riku

Programmer
Sep 2, 2001
119
I possibly found a bug in Corel Draw VBA engine?

A. When using CreateSelection in a loop the selection is only activated at first loop event even though loop goes trough several times.

B. If putting a TOGGLE POINT AT SERTAIN ROW marked below the CreateSelection is getting activated each loop.


Dim p_index As Integer
Dim theShapeRange As ShapeRange
Dim x As Double, y As Double
For p_index = 0 To ActiveDocument.Pages.Count - 1

Dim thePage As Page
Set thePage = ActiveDocument.Pages(p_index + 1)
thePage.Activate

Set theShapeRange = ActivePage.Shapes.All
theShapeRange.CreateSelection
ActivePage.Layers("Layer 1").Activate 'Toggle point here
ActiveSelection.GetSize x, y

Debug.Print ActiveDocument.ActivePage.Name & "|" & x
Next


Example on result

I have 5 pages and different drawing on all pages.

Output:

A.
Without TOGGLE POINT
page 1 | 3,34
page 2 | 3,34
page 3 | 3,34
page 4 | 3,34
page 5 | 3,34

B.
Using TOGGLE POINT
page 1 | 3,34
page 2 | 60,333
page 3 | 23,32
page 4 | 31,3
page 5 | 32,34


Any Ideas how tofix thesituation?



F: Riku Tuominen
riku.tuominen@benchmarking.fi
 
Problem solved.

I installed SP1 of Corel Draw 12.

Riku


F: Riku Tuominen
riku.tuominen@benchmarking.fi
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top