problem in usuing word object
Hi All
I am using word object in my appllication to implement find replace functonality.
The problem is that all the desired words are gerring replaced fine,but the words which are inside the textbox in the word document are not getting replaced.
Do Any one have idea how to solve this?
-Sachien
Re: problem in usuing word object
Those textboxes are ActiveX control or Form control. You need to write a function to search those
since they dont get searched with the standard .Find or .Replace methods.
Re: problem in usuing word object
Thanks for giving some idea for that
Can u please tell me the code for that function also
This will really help me.
Waiting
Sachien
Re: problem in usuing word object
Use the Me keyword to access an ActiveX control like a TextBox.
VB Code:
Private Sub SearchMe()
Me.TextBox1.Text = "Changed Text From Code!"
End Sub
1 Attachment(s)
Re: problem in usuing word object
The text box i m referring to is not a visulabasic control.
This text box refers to textbox in the word document.
PLEASE SEE THE WORD FILE ATTACHED
Re: problem in usuing word object
Are you trying to create a mailmerge document? If so the "<< >>" are not the correct characters to
designate a merge field. You dont need to add a textbox for this. Use the MailMerge toolbar to create a MM document.
Re: problem in usuing word object
I Did that by using StoryRanges
Storyrangges fin al the shapes ,textpox etc in the word documment
Re: problem in usuing word object
Yes, but the "<< >>" chars are not for mail merge fields.