|
|
|
|
|
|
Word
|
Animated Word Art
|
|
Ease of Use
|
Intermediate
|
Version tested with
|
2000
|
Submitted by:
|
Brandtrock
|
Description:
|
WordArt in a Word document can be animated to a certain extent. This example illustrates how to twist the letters back and forth and how to spin the WordArt like an airplane propellor.
|
Discussion:
|
The animation of a WordArt object in a document can make quite an impression on co-workers or clients. No real functionality is added, this is purely bells and whistles stuff. The speed of the animations may vary depending upon your computer. The cycle and angle variations should be adjusted as required to suit your own particular system.
|
Code:
|
instructions for use
|
Option Explicit
Dim m As Variant
Dim i As Variant
Sub StartDemo()
On Error Resume Next
ActiveDocument.Shapes("WordArt 1").Select
m = 1
For i = 1 To 80
Selection.ShapeRange.TextEffect.Tracking = m
m = m + 0.125
DoEvents
Next i
For i = 80 To 1 Step -1
Selection.ShapeRange.TextEffect.Tracking = m
m = m - 0.125
DoEvents
Next i
Selection.ShapeRange.TextEffect.Tracking = 1
ActiveDocument.Shapes("WordArt 2").Select
For i = 1 To 8
Selection.ShapeRange.IncrementRotation 45#
DoEvents
Next i
Selection.ShapeRange.TextEffect.Tracking = 1
ActiveDocument.Shapes("WordArt 2").Select
m = 1
For i = 1 To 80
Selection.ShapeRange.TextEffect.Tracking = m
m = m + 0.0675
DoEvents
Next i
For i = 80 To 1 Step -1
Selection.ShapeRange.TextEffect.Tracking = m
m = m - 0.0675
DoEvents
Next i
Selection.ShapeRange.TextEffect.Tracking = 1
ActiveDocument.Shapes("WordArt 2").Select
For i = 1 To 72
Selection.ShapeRange.IncrementRotation 15#
DoEvents
Next i
Selection.ShapeRange.TextEffect.Tracking = 1
Selection.GoTo What:=wdGoToPage, Which:=wdGoToFirst, Count:=1, Name:=""
End Sub
Option Explicit
Private Sub Document_Open()
StartDemo
End Sub
|
How to use:
|
- Open a document.
- Create two WordArts of your own design.
- Copy the code marked Code for Module1.
- Press Alt + F11 to open the Visual Basic Editor (VBE).
- From the Menu, choose Insert-Module.
- Paste the code into the right-hand code window.
- Double-click on the ThisDocument module.
- Select Document from the top left drop down box.
- Select Open from the right drop down box.
- Type StartDemo between the Private Sub Document_Open() line and the End Sub line.
- Close the VBE
- Save the file.
- Close the file.
|
Test the code:
|
- To test your code, simply open the document you just saved (or the example file). The Document Open event will fire the StartDemo macro upon opening.
|
Sample File:
|
Moving_Word_Art_doc.zip 11.86KB
|
Approved by mdmackillop
|
This entry has been viewed 134 times.
|
|