Word tutorials: • Microsoft Word 2013 tutorials
E-book • Free e-book - 20.14 Text Effects in M...
/ besttexteffectsinword
http://issuu.com/upir/docs/best_text_...
----------------------------------------------------------------
Sub interpolate()
'
' interpolate Macro
'
'
Dim point_a_x As Single
Dim point_b_x As Single
Dim point_a_y As Single
Dim point_b_y As Single
Dim num_points As Long
num_points = 10
point_a_x = 50
point_a_y = 20
point_b_x = 250
point_b_y = 100
For counter = 0 To (num_points - 1)
' calculate and draw a point
xpos = point_a_x + ((point_b_x - point_a_x) * (counter / (num_points - 1)))
ypos = point_a_y + ((point_b_y - point_a_y) * (counter / (num_points - 1)))
ActiveDocument.Shapes.AddShape(msoShapeOval, xpos, ypos, 10, 10).Select (False)
Next counter
Selection.ShapeRange.Group
End Sub
Sub interpolate()
'
' interpolate Macro
'
'
Dim point_a_x As Single
Dim point_b_x As Single
Dim point_a_y As Single
Dim point_b_y As Single
Dim num_points As Long
num_points = 10
point_a_x = 50
point_a_y = 20
point_b_x = 250
point_b_y = 100
For counter = 0 To (num_points - 1)
' calculate and draw a point
xpos = point_a_x + ((point_b_x - point_a_x) * (counter / (num_points - 1)))
ypos = point_a_y + ((point_b_y - point_a_y) * (counter / (num_points - 1)))
ActiveDocument.Shapes.AddShape(msoShapeOval, xpos, ypos, 10, 10).Select (False)
Next counter
Selection.ShapeRange.Group
End Sub
Watch video WORD: Linear Interpolation with VBA (Tutorial) online without registration, duration hours minute second in high quality. This video was added by user Vaclav Krejci 24 August 2018, don't forget to share it with your friends and acquaintances, it has been viewed on our site 1,916 once and liked it 19 people.