type librarys ( msword2000)

i imported msword2000 type library (.olb) file using tlibimp and the resulting library contained well over 100 delphi reserved words in procedures
stuff like:

procedure foo( const : string; object : variant; type : olevariant; end : integer;)

obviously when i tried to use it delphi wasnt too happy ;-)
so why it create a file using reserved words?
is this normal?ive never noticed it before..
is there a better importer etc ..so i dont have to go through 10million lines changing half the procedures.
your comments on the matter are welcome
i was thinking of importing more olbs but i think i'll wait ..
Regards Barry
LVL 17
Who is Participating?
florisbConnect With a Mentor Commented:

Menu: Project | Import Type Library
gives me a list with also msWord9.olb in it, I can create a unit from it here.
(Delphi 5, professional, was the same in Delphi 4).

In this olb functionality to f.e. open a document from a temlate, insert text / pictures / tables, to saveas, print, perform a mailmerge (!).
I don't know about other library's you could use for Word.

Outlook: msoutl9.olb, using the Import Type Library option of Delphi you see all registered lib's on your computer.

What kind of examples do you need (then I'll check what I have).

I could post or mail the olb after I imported it (.pas), if that doesn't work in your Delphi.


Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Hello inthe,

I'm afraid I don't understand your question correctly; what is tlibimp?

If I import f.e. the Word library with Project | import type library | create unit, the created _tlb starts with some lines like:
//   Hint: Member 'End' of 'Range' changed to 'End_'
So functions look like this, without reserved words:
    procedure SetRange(Start: Integer; End_: Integer); safecall;
No changing needed at all.

I once got a tip just to use file | open and set the file type to library for the most complete way to view a library you import.

Good luck!
Which Delhpi version are you using???
intheAuthor Commented:
i used the library importer in delphi bin(cant remember name off hand something like tlibimp.exe),
i tried it off the delphi menu and the file not present..
im off for a meeting back later .,maybe you have idea?
D4.03 c/s

File not present in Delphi menu? Add should help?

And why not import the way I suggested?

You answered some pretty complicated questions of mine, I expect you're not looking for a Word-automation example?

tlibimp.exe is a mystery for me... ...never heard of it.
intheAuthor Commented:
hi floris ,
you dont have tlibimp.exe in your delphi bin ?
oh well ,maybe your version is standard or professional ?
tlibimp is a command line type library importer.can import files of type word.olb and creates a word_tlb file.
how do you suggest i do it
(i tried add in delphi importer but i cant add a .olb file)
i suppose what i need to know is what files should i import to get ALL the  _tlb files for word2000 ,outlook2000 and the other office2000 programs etc ..?
some are present i the delphi "import activeX control" some are not..

Examples of automation (the more the better)i dont do it much so bit of learning (i know the basics and have several examples but all they do is create a document and type "hello" or something they dont do anything very in depth.)
actually the problem arose when i was answering another question and discovered this.
i want to learn more about it so i will raise the points before accepting a answer and for examples as well
but only if you have them(dont go spending amounts of time on it as i can wait if your busy)..
first i need all the _tlb files ;-)

intheAuthor Commented:
ahhh ha ,
import activex control
import type libarary

yeh i picked the wrong one ,no wonder i couldnt import any olb's ;-)
have got them all now,havent compiled them yet but will do later..
have you worked with any _tlbs other than word or outlook?
frontpage one maybe? i suppose they all similar to use..

intheAuthor Commented:
if you dont mind send some examples that do some different stuff to
(just when you have the time)
I'll do that.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.