Solved

creating an addin to insert code into my vb project

Posted on 2004-08-06
4
191 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

Highfive + Dolby Voice = No More Audio Complaints!

Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

Join & Write a Comment

Introduction I needed to skip over some file processing within a For...Next loop in some old production code and wished that VB (classic) had a statement that would drop down to the end of the current iteration, bypassing the statements that were c…
Enums (shorthand for ‘enumerations’) are not often used by programmers but they can be quite valuable when they are.  What are they? An Enum is just a type of variable like a string or an Integer, but in this case one that you create that contains…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
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…

707 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

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now