|
-
Oct 8th, 2005, 07:03 PM
#1
Thread Starter
Addicted Member
VBA to Word
Hii all,
I have made an application to send the values from VB to Word.
Using bookmarks in word and created a template. Now that template has 25 bookmarks, named as B1, B1E, B2, B2E, B3, 3E, B4, B4E..........B25, B25E.
Now when i save the data into the template i get an Error, when the value of i=11 i get the error message
the code goes as follows:----------------------------------------------
VB Code:
Public FldRng(1 To 25) As Range
Public Sub SavePage1()
Dim i As Integer
For i = 1 To 25
FldRng(i) = Page1.Text(i)
Next
Pages.Save
FormChanged = False
End Sub
Public Sub SetRanges1()
Dim i As Integer
For i = 1 To 25
[COLOR=YellowGreen]' at this place i get an error[/COLOR]
Set FldRng(i) = Pages.Range(Start:=Pages.Bookmarks(i * 2 - 1).Range.End, _
End:=Pages.Bookmarks(i * 2).Range.Start - 1)
Next
End Sub
--------------------------------------------------------------------------
the above are small Functions that use.
can someone pls help me.
thanks
Last edited by RobDog888; Oct 8th, 2005 at 08:51 PM.
Reason: Added [vbcode] tags
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|