Code Librarian automation?

R

R Avery

I have recently found out about the Code Librarian, packaged in the
Office XP Developer cd... i have read online that it is supposed to be
an addin for the VBE, however when I installed everything from the CD, i
do not see any code librarian addin for the VBE. I do see a stand-alone
executable to view the code library, but i do not see any sort of addin
in the VBE for it.

Is there any additional configuration i need to do?

Also, is the code in the .clb file accessible through VB? Specifically,
there is some code that i KNOW i would like to access a lot and paste
directly into many different sheets using VB extensibility. For
example, using the Call Tree example in the Developer CD, one can
determine, under certain conditions, if there any function calls in a
module that are unresolved because the function does not exist in the
project. What could be done is lookup the missing function by name in
the code library and automatically dump it to another module in the
project called MissingFunctions...
 
G

George Nicholson

I believe that Code Librarian was an add-in for Office 2000 ODE but a
stand-alone for Office XP ODE.

(As an Add-in, it opened in it's own window and it really behaved like a
stand-alone which had to be opened via the VBE).

This is from memory. Actual mileage may vary
 
B

Bob Phillips

Have you loaded it from theAddin manager?

According to Chip Pearson, this is how to access it via Visual Studio,

Interestingly, this is part of Office Developer, but not part of the Visual
Studio suite. When I'm running VB6, I have to start it up fro the Start
menu, rather than going thru the Add-Ins menu.



--

HTH

RP
(remove nothere from the email address if mailing direct)
 
R

R Avery

I see... thanks a lot.

Any idea if there is a way to programmatically extract and search the
..clb files the Code Librarian uses?
 
R

R Avery

It does not appear in the Addin Manager for Excel VBA, or Visual Basic 6.

This is the version from the Office XP Developer. If George Nicholson's
memory serves, it is a stand alone app, not something accessed from the
addin manager.
 
B

Bob Phillips

It does in my Excel VBA addin manager.

--

HTH

RP
(remove nothere from the email address if mailing direct)
 
M

Myrna Larson

The library is an Access database. The password is

CodeLib

The code is in the table named tblCode, memo field named Code. You often need
to select the field and press F2 to see more than the first line.
 
R

R Avery

Ahhh, i see. Excellent. Since it is just an access database, it can be
automated.

For example, i often come across situations where i need to add a
function to a project that cannot refer to outside DLLs or addins.
It is possible to add a menuitem to the right-click menu of the VBE that
would extract the currently selected word, and retrieve the function in
the code librarian, pasting it into a new module or perhaps below the
currently selected line or procedure.

This would also be helpful when copying entire modules over to a new
project that has external dependencies. Just let Debug | Compile bring
your attention to the missing function, right click and automatically
get the function!

Also, this would allow me to populate the Code librarian in bulk. Say
that I believe a few of my modules have functions which are finalized,
and which have a function comment immediately below the declaration.
Then, I can search for each function in each of these modules and
programmatically add the description, function body, and author to the
code librarian - All I would need is to pick the category it belongs in
(could be a popup treeview form, prompting me for category).

Of course, I do not want to write this if it has already been done
before... if anyone has done anything like this, please let me know.

Also, if anyone had ever written an object model that wraps the
database, such that I could write code like the following, let me know.


Sub PleaseLetSomeoneHaveWrittenThis()
Dim Author As CAuthor, CodeEntry As CCodeEntry
Dim DB As CodeLibrianDB, strCode As String, strDesc As String

' ... Get code and desc.

Set Author = DB.Authors.Add("Public", "John")
Author.Initial = "Q"

Set CodeEntry = DB.CodeEntries.Add(strCode, strDesc, Author)

With CodeEntry.Keywords
.Add "My Keyword"
.Add "My Keyword2"
.Add "My Keyword3"

End With


End Sub
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top