Solved

creating an addin to insert code into my vb project

Posted on 2004-08-06
4
195 Views
Last Modified: 2012-05-05
Hello,

I want to create an add-in that, when called will insert 4 lines of text into the VB IDE . I don't know much about add-ins and would like to know if this is possible.  The text is placed where the curser is located .

Just wondering if anyone could give a few pointers as to how i'd get started  ?


Thanks.

Ken
0
Comment
Question by:kfc23
  • 2
4 Comments
 
LVL 9

Accepted Solution

by:
dancebert earned 65 total points
ID: 11736930
Francesco Balena wrote an article in the Augues 97 Visual Basic Programmers Journal that describes in detail the object model needed to write an add-in that communicates with the IDE.  I just skimmed the article, it doesn't explictly say one can insert code, but it doesn't say one can't either.  VBPJ archives are at www.devx.com.  I don't have a URL for the article, just a xerox copy of the dead tree version.  Title of the article is 'Roll your own Add-ins'
0
 
LVL 7

Assisted Solution

by:Burbble
Burbble earned 60 total points
ID: 11737922
Here's a good example:
http://www.frez.co.uk/vbaddindemo.zip

There is a "Timestamp" function that I believe inserts lines into the code window. You can modify it to do whatever you want.

-Burbble
0
 
LVL 7

Expert Comment

by:Burbble
ID: 11752351
It looks like you got it working, glad I could help ;-)

-Burbble
0
 

Author Comment

by:kfc23
ID: 11752932
ya both comments were very helpful . works great. thanks a lot.
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction While answering a recent question (http://www.experts-exchange.com/Q_27402310.html) in the VB classic zone, I wrote some VB code in the (Office) VBA environment, rather than fire up my older PC.  I didn't post completely correct code o…
Since upgrading to Office 2013 or higher installing the Smart Indenter addin will fail. This article will explain how to install it so it will work regardless of the Office version installed.
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

726 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question