The Microsoft Office Word text processing program includes the Visual Basic for Applications scripting tool that allows users to insert calculated fields, such as a Fibonacci sequence of numbers, in their text documents. The Fibonacci numbers are the integer sequence 0, 1, 1, 2, 3, 5, 8, 13, 21, ..., in which each item is the sum of the previous two numbers in the sequence. By implementing a recursive loop in your VBA script, you can calculate a Fibonacci sequence in VBA Word.

Click the "Start" button in Windows and select the "Microsoft Word" program.

Click "Tools" and then "Scripts" to create the VBA script for calculating a Fibonacci sequence.

Enter the following code in the window:
Function fibonacci(ByVal n as Integer)
If (n <= 0) Then
fibonacci = 0
ElseIf (n = 1) Then
fibonacci = 1
Else
fibonacci = fibonacci(n1) + fibonacci(n2)
End If
End Function

Click "File" and then "Save" to save the "fib.doc" Word document with the VBA script for calculating Fibonacci sequence of numbers.
Related Searches
References
 Photo Credit Jupiterimages/Photos.com/Getty Images