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
Смотрите видео WORD: Linear Interpolation with VBA (Tutorial) онлайн без регистрации, длительностью часов минут секунд в хорошем качестве. Это видео добавил пользователь Vaclav Krejci 24 Август 2018, не забудьте поделиться им ссылкой с друзьями и знакомыми, на нашем сайте его посмотрели 1,916 раз и оно понравилось 19 людям.