473,769 Members | 5,900 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Find and Replace utility thru DTE.find

I want to find out that if there is a mechanism to find a text inside a C# file and replace it with another string.

I am using DTE to do it, the find proerty does it, the results are getting displayed in a find results window pane , but I m not able to programmaticall y take the contents of the pane.

DTE.Find.FindWh at = "catch"
DTE.Find.Target = vsFindTarget.vs FindTargetFiles
DTE.Find.MatchC ase = False
DTE.Find.MatchW holeWord = False
DTE.Find.MatchI nHiddenText = True
DTE.Find.Patter nSyntax = vsFindPatternSy ntax.vsFindPatt ernSyntaxLitera l
DTE.Find.Search Path = "Current Project"
DTE.Find.Search Subfolders = True
DTE.Find.FilesO fType = "*.aspx.cs"
DTE.Find.Result sLocation = vsFindResultsLo cation.vsFindRe sults1
DTE.Find.Action = vsFindAction.vs FindActionFindA ll
DTE.Find.Execut e()
DTE.Windows.Ite m(Constants.vsW indowKindFindRe sults1).Activat e()
MsgBox(DTE.Acti veWindow.Captio n)

I am able to access the caption of that result pane but not the contents of that result pane.

---
Posted using Wimdows.net Newsgroups - http://www.wimdows.net/newsgroups/
Nov 15 '05 #1
0 2774

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

19
2935
by: rbt | last post by:
Here's the scenario: You have many hundred gigabytes of data... possible even a terabyte or two. Within this data, you have private, sensitive information (US social security numbers) about your company's clients. Your company has generated its own unique ID numbers to replace the social security numbers. Now, management would like the IT guys to go thru the old data and replace as many SSNs with the new ID numbers as possible. You...
0
1448
by: ianstratford | last post by:
I just released a new version of the free Microsoft Access find and replace add-in utility (version 1.5). Search and replace (optionally) any string in tables, queries, macros, forms, reports and modules in Access databases. The tool will now search and replace Report Group Levels (Thank you Judy). The new version also searches macros (logs results but does not
1
14277
by: amit | last post by:
hi, I want to find out that if there is a mechanism to find a text inside a C# file and replace it with another string. I am currently doing it with regex.match and thru streamreader class, but I believe it would be very time consuming, please reply ASAP to tell if there is a better solution or how can i optimize this code also. bye amit --- Posted using Wimdows.net Newsgroups - http://www.wimdows.net/newsgroups/
0
2133
by: amit | last post by:
hi I have created a tool which does a find and replace thru DTE, now after it is done, it opens up a window, "FIND REACHED THE STARTING POINT OF SEARCH" I want to disbale this window programmatically. how should i do it this is a partial code Dim dsData As DataSe
3
1895
by: Roger | last post by:
I'm having a little trouble using the Regex.Replace method. I am trying to perform a search and replace based on string pattern. I've been successful in replacing string from it's starting position to the end of the string value, however, I want to better define an ending position. Below follows the code I'm using: string a = "Hello, World, How are you?"; textBox1.Text = Regex.Replace(a, "W.*", "Mickey");
0
1215
by: =?Utf-8?B?U3Vwcml5YQ==?= | last post by:
Oracle has a migration utility that lets you convert an application in Access to Oracle forms. See <http://www.oracle.com/technology/products/database/application_express/ viewlets/apex_quicktour_viewlet.html> Does Microsoft have a similar utility, one that can convert Access forms and reports to .Net ? I am looking at migrating an application built in Access to a .Net web application real fast without having to go thru' the whole...
1
2874
by: Lengara | last post by:
I have an Access form that will be FTPing information. The FTP info will be using a text file located on the hard drive. This text file will have symbolics in it that will be replaced by entries on the Access form. I am looking for code to open a text file in the background and run a find/replace based on fields on the form. Thanks.
6
1940
by: erbrose | last post by:
Hey all! been searching around the forum and google this morning looking for a simple way to parse thru a tab delinated file and do a find and replace. Here is what I've come up with so far as a script (Im still a newbie) #!/usr/bin/perl use strict; my $fileInput='d:/temp/test.txt'; my $fileOutput='d:/temp/Newtest.txt';
2
998
TTCEric
by: TTCEric | last post by:
In VB6, you just had available a Find dialog. Now, in .NET you have several options. "Find Symbol", "Quick Find" and "Quick Replace". None seem to do what I want: simply find some code. Inundated with all these options makes me think i'm picking the wrong things. But, you see, I dont want options. I just want to find a block of code (utter frustration here). Any pointers on getting it to work simply as the VB6 find utility? And whats...
0
10210
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10043
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
9990
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8869
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7406
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6672
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5298
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
2
3561
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2814
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.