Feb 22nd, 2005, 09:02 PM
#1
Thread Starter
Lively Member
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
Last edited by sachien; Feb 23rd, 2005 at 08:55 PM .
Feb 22nd, 2005, 09:53 PM
#2
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.
VB/Office Guru™ (AKA: Gangsta Yoda ™ ® )
I dont answer coding questions via PM. Please post a thread in the appropriate forum.
Microsoft MVP 2006-2011
Office Development FAQ (C#, VB.NET, VB 6, VBA)
Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
If a post has helped you then Please Rate it!
• Reps & Rating Posts • VS.NET on Vista • Multiple .NET Framework Versions • Office Primary Interop Assemblies • VB/Office Guru™ Word SpellChecker™.NET • VB/Office Guru™ Word SpellChecker™ VB6 • VB.NET Attributes Ex. • Outlook Global Address List • API Viewer utility • .NET API Viewer Utility •
System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6
Feb 22nd, 2005, 11:41 PM
#3
Thread Starter
Lively Member
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
Feb 23rd, 2005, 12:12 AM
#4
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
VB/Office Guru™ (AKA: Gangsta Yoda ™ ® )
I dont answer coding questions via PM. Please post a thread in the appropriate forum.
Microsoft MVP 2006-2011
Office Development FAQ (C#, VB.NET, VB 6, VBA)
Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
If a post has helped you then Please Rate it!
• Reps & Rating Posts • VS.NET on Vista • Multiple .NET Framework Versions • Office Primary Interop Assemblies • VB/Office Guru™ Word SpellChecker™.NET • VB/Office Guru™ Word SpellChecker™ VB6 • VB.NET Attributes Ex. • Outlook Global Address List • API Viewer utility • .NET API Viewer Utility •
System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6
Feb 23rd, 2005, 01:16 AM
#5
Thread Starter
Lively Member
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
Attached Files
Last edited by sachien; Feb 23rd, 2005 at 01:29 AM .
Feb 23rd, 2005, 12:31 PM
#6
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.
VB/Office Guru™ (AKA: Gangsta Yoda ™ ® )
I dont answer coding questions via PM. Please post a thread in the appropriate forum.
Microsoft MVP 2006-2011
Office Development FAQ (C#, VB.NET, VB 6, VBA)
Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
If a post has helped you then Please Rate it!
• Reps & Rating Posts • VS.NET on Vista • Multiple .NET Framework Versions • Office Primary Interop Assemblies • VB/Office Guru™ Word SpellChecker™.NET • VB/Office Guru™ Word SpellChecker™ VB6 • VB.NET Attributes Ex. • Outlook Global Address List • API Viewer utility • .NET API Viewer Utility •
System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6
Feb 23rd, 2005, 08:56 PM
#7
Thread Starter
Lively Member
Re: problem in usuing word object
I Did that by using StoryRanges
Storyrangges fin al the shapes ,textpox etc in the word documment
Feb 23rd, 2005, 09:03 PM
#8
Re: problem in usuing word object
Yes, but the "<< >>" chars are not for mail merge fields.
VB/Office Guru™ (AKA: Gangsta Yoda ™ ® )
I dont answer coding questions via PM. Please post a thread in the appropriate forum.
Microsoft MVP 2006-2011
Office Development FAQ (C#, VB.NET, VB 6, VBA)
Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
If a post has helped you then Please Rate it!
• Reps & Rating Posts • VS.NET on Vista • Multiple .NET Framework Versions • Office Primary Interop Assemblies • VB/Office Guru™ Word SpellChecker™.NET • VB/Office Guru™ Word SpellChecker™ VB6 • VB.NET Attributes Ex. • Outlook Global Address List • API Viewer utility • .NET API Viewer Utility •
System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6
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