Add-In / Macro Help

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Alex Stevens

    #1

    Add-In / Macro Help

    Hi All,

    I was hoping that someone could put me in the right direction with a utility
    I'm trying to write for myself.
    I would like to have a search which would find a string anywhere in my
    current project, and copy the whole line either to a ouput window, or
    optionally to a file.

    Where would I even start with this.
    Would someone give me a few pointers?

    Thanks

    Alex


  • Matt

    #2
    RE: Add-In / Macro Help

    I know VB.NET has a function, INSTR(), that tells you whether a certain substring is contained in the whole string.

    I hope this helps.

    Matt

    "Alex Stevens" wrote:
    [color=blue]
    > Hi All,
    >
    > I was hoping that someone could put me in the right direction with a utility
    > I'm trying to write for myself.
    > I would like to have a search which would find a string anywhere in my
    > current project, and copy the whole line either to a ouput window, or
    > optionally to a file.
    >
    > Where would I even start with this.
    > Would someone give me a few pointers?
    >
    > Thanks
    >
    > Alex
    >
    >
    >[/color]

    Comment

    • Tufan Erdinc [MSFT]

      #3
      Re: Add-In / Macro Help

      Hi Alex,

      The best place to start is to look at similar samples and walkthrougs and
      start your project by re-using some of those samples.

      There's a macro sample on MSDN for adding a text in a VB code editor. That
      may help you start with using Text Documents.

      http://msdn.microsoft.com/library/de...codewindow.asp

      Also if you start VS and Go to Tools-Macros-Macro Explorer, you will see a
      "Samples" Macro project. In those samples you can take a look at samples
      under Utilities, like "FindLine", "FindCase" etc. Also you can use Macro
      Recorder (Tools-Macros-Record Temporary Macro) to get code for some common
      actions that you may use in your project.

      Let me know if you need anything else.

      Thanks
      Tufan


      "Alex Stevens" <AlexStevens_NO SPAMPLEASE@gcc. co.uk> wrote in message
      news:u3J9RiIcEH A.308@TK2MSFTNG P12.phx.gbl...[color=blue]
      > Hi All,
      >
      > I was hoping that someone could put me in the right direction with a
      > utility
      > I'm trying to write for myself.
      > I would like to have a search which would find a string anywhere in my
      > current project, and copy the whole line either to a ouput window, or
      > optionally to a file.
      >
      > Where would I even start with this.
      > Would someone give me a few pointers?
      >
      > Thanks
      >
      > Alex
      >
      >[/color]


      Comment

      • Carlos J. Quintero [MVP]

        #4
        Re: Add-In / Macro Help

        You have a lot of resources in the Files section of the forum below to get
        you started with add-ins/macros:
        --

        Carlos J. Quintero (Visual Developer - .NET MVP)

        FAQs, Knowledge Base, Files, Docs, Articles, Utilities, etc. for .NET
        addins:
        http://groups.yahoo.com/group/vsnetaddin/ (free join)



        "Alex Stevens" <AlexStevens_NO SPAMPLEASE@gcc. co.uk> escribió en el mensaje
        news:u3J9RiIcEH A.308@TK2MSFTNG P12.phx.gbl...[color=blue]
        > Hi All,
        >
        > I was hoping that someone could put me in the right direction with a[/color]
        utility[color=blue]
        > I'm trying to write for myself.
        > I would like to have a search which would find a string anywhere in my
        > current project, and copy the whole line either to a ouput window, or
        > optionally to a file.
        >
        > Where would I even start with this.
        > Would someone give me a few pointers?
        >
        > Thanks
        >
        > Alex
        >
        >[/color]


        Comment

        Working...