BorlandTalk.com Forum Index BorlandTalk.com
Borland discussion newsgroups
 
Archives   FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

WORD_TLB Type Library Compilation Error
Goto page 1, 2  Next
 
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> Delphi OLE Automation
View previous topic :: View next topic  
Author Message
Des Tuff
Guest





PostPosted: Tue Sep 27, 2005 6:04 am    Post subject: WORD_TLB Type Library Compilation Error Reply with quote




I am writing an application which writes to a Microsoft Word
document. To set up the OleAutomation I have imported the
Microsoft Word 11 Object Library available under "Import Type Library".
Once I include WORD_TLB in my uses clause and compile
I get a compilation error.The error message reports unknown
variable declarations for many of the function return variables
in the WORD_TLB.pas unit.
Is there another unit I must include in the Uses clause?
How do I fix this?

Rgds Des Tuff





Back to top
Oliver Townshend
Guest





PostPosted: Tue Sep 27, 2005 6:26 am    Post subject: Re: WORD_TLB Type Library Compilation Error Reply with quote



Quote:
I am writing an application which writes to a Microsoft Word
document. To set up the OleAutomation I have imported the
Microsoft Word 11 Object Library available under "Import Type Library".
Once I include WORD_TLB in my uses clause and compile
I get a compilation error.The error message reports unknown
variable declarations for many of the function return variables
in the WORD_TLB.pas unit.
Is there another unit I must include in the Uses clause?
How do I fix this?

I don't have my PC with Delphi/Office available at the moment, but I think
there is an office_tlb unit as well.

Posting at least one error example would be useful.

Oliver Townshend



Back to top
Des Tuff
Guest





PostPosted: Tue Sep 27, 2005 11:03 am    Post subject: Re: WORD_TLB Type Library Compilation Error Reply with quote




Hi

I tried including Office_TLB and VBIDE_TLB in the units clause
with no luck.

A typical compilation error line in Word_TLB is ...

function Get_AutomationSecurity: MsoAutomationSecurity; safecall;

with the error message....

[Error] Word_TLB.pas(5392): Undeclared identifier: 'MsoAutomationSecurity'

Thanks for help

Des Tuff
Back to top
Oliver Townshend
Guest





PostPosted: Tue Sep 27, 2005 11:10 am    Post subject: Re: WORD_TLB Type Library Compilation Error Reply with quote

Quote:
A typical compilation error line in Word_TLB is ...

function Get_AutomationSecurity: MsoAutomationSecurity; safecall;

with the error message....

[Error] Word_TLB.pas(5392): Undeclared identifier: 'MsoAutomationSecurity'

Have you imported the Type Libraries, or you using the ones that come with
Delphi? And what version of Delphi and Office are you using?

Oliver Townshend



Back to top
Mike Shkolnik
Guest





PostPosted: Tue Sep 27, 2005 11:40 am    Post subject: Re: WORD_TLB Type Library Compilation Error Reply with quote

What Delphi version do you use? As I remember, the Delphi 6 (without
updates) have the bug in Type Library importing.

--
With best regards, Mike Shkolnik
EMail: [email]mshkolnik (AT) scalabium (DOT) com[/email]
http://www.scalabium.com

"Des Tuff" <des (AT) infodeck (DOT) co.za> wrote

Quote:

I am writing an application which writes to a Microsoft Word
document. To set up the OleAutomation I have imported the
Microsoft Word 11 Object Library available under "Import Type Library".
Once I include WORD_TLB in my uses clause and compile
I get a compilation error.The error message reports unknown
variable declarations for many of the function return variables
in the WORD_TLB.pas unit.
Is there another unit I must include in the Uses clause?
How do I fix this?

Rgds Des Tuff








Back to top
Des Tuff
Guest





PostPosted: Tue Sep 27, 2005 12:28 pm    Post subject: Re: WORD_TLB Type Library Compilation Error Reply with quote


Hi

I imported the type libraries into the project from the selectable list in delphi using the Project/Import Type Library option. I'm using Delphi6.

It is Microsoft Office Word 2003 (11.5604.5606)
Part of Microsoft Office Professional Edition 2003

Des Tuff
Back to top
Des Tuff
Guest





PostPosted: Tue Sep 27, 2005 12:36 pm    Post subject: Re: WORD_TLB Type Library Compilation Error Reply with quote


Hi Mike,

I am using Delphi 6.Usually when we install Delphi on a new PC
we install all the upgrades but this was a new laptop and I
did not do the installation. I will check. We have update 1
and 2 is there more?

Thanks again

Des Tuff


Back to top
Mike Shkolnik
Guest





PostPosted: Tue Sep 27, 2005 1:05 pm    Post subject: Re: WORD_TLB Type Library Compilation Error Reply with quote

Just install updates and after that you'll import the type library without
errors.

--
With best regards, Mike Shkolnik
EMail: [email]mshkolnik (AT) scalabium (DOT) com[/email]
http://www.scalabium.com

"Des Tuff" <des (AT) infodeck (DOT) co.za> wrote

Quote:

Hi Mike,

I am using Delphi 6.Usually when we install Delphi on a new PC
we install all the upgrades but this was a new laptop and I
did not do the installation. I will check. We have update 1
and 2 is there more?

Thanks again

Des Tuff





Back to top
Des Tuff
Guest





PostPosted: Tue Sep 27, 2005 1:33 pm    Post subject: Re: WORD_TLB Type Library Compilation Error Reply with quote


Hi Mike,

I re did the upgrades and removed and reinstalled the MicroSoft
Word library and that seemed to do the trick.

Thanks very much for the help

Best Rgds

Des Tuff

PS I don't suppose you know how to include tables in a rtf
document. I want to be able to left align the text and right
align the numbers in an invoice but I cannot seem to be able
to insert a table.

I've tried creating the layout in Word and then saving to and
rtf but it just go all over the place.

Thanks again.
Back to top
Des Tuff
Guest





PostPosted: Tue Sep 27, 2005 1:33 pm    Post subject: Re: WORD_TLB Type Library Compilation Error Reply with quote


Hi Mike,

I re did the upgrades and removed and reinstalled the MicroSoft
Word library and that seemed to do the trick.

Thanks very much for the help

Best Rgds

Des Tuff

PS I don't suppose you know how to include tables in a rtf
document. I want to be able to left align the text and right
align the numbers in an invoice but I cannot seem to be able
to insert a table.

I've tried creating the layout in Word and then saving to and
rtf but it just go all over the place.

Thanks again.
Back to top
Des Tuff
Guest





PostPosted: Tue Sep 27, 2005 1:36 pm    Post subject: Re: WORD_TLB Type Library Compilation Error Reply with quote


Hi Mike

That seems to have worked.

Thanks very much

Best Rgds

Des Tuff

PS Don't suppose you know how to include a table in a rtf file?
Back to top
Mike Shkolnik
Guest





PostPosted: Tue Sep 27, 2005 2:47 pm    Post subject: Re: WORD_TLB Type Library Compilation Error Reply with quote

Quote:
PS Don't suppose you know how to include a table in a rtf file?
Do you mean to insert into the TRichEdit or do you need the syntax for

rtf-format?

I added the tables in my SMExport but there I don't use the TRichEdit. I
creates the rtf-file on-fly.

--
With best regards, Mike Shkolnik
EMail: [email]mshkolnik (AT) scalabium (DOT) com[/email]
http://www.scalabium.com



Back to top
Oliver Townshend
Guest





PostPosted: Tue Sep 27, 2005 3:31 pm    Post subject: Re: WORD_TLB Type Library Compilation Error Reply with quote


Quote:
PS I don't suppose you know how to include tables in a rtf
document. I want to be able to left align the text and right
align the numbers in an invoice but I cannot seem to be able
to insert a table.

I've tried creating the layout in Word and then saving to and
rtf but it just go all over the place.

That shouldn't happen. Do you have the auto-size columns option on?

Oliver Townshend



Back to top
Des Tuff
Guest





PostPosted: Tue Sep 27, 2005 4:09 pm    Post subject: Re: WORD_TLB Type Library Compilation Error Reply with quote


Hi Oliver,

Let me expand on what I'm trying to do. I was using a rtf file
as an invoice template and replacing the tags with the amounts
etc. I did not want to open up Word but simply display the
invoice in a Rich Text memo control within Delphi. The user
could then print or save as he wished.

The problen was that the layout in the rtm control could not
handle the table. I was forced to use the table in order to
be able to left justify the invoice line text and right justify
the amount to get the amounts to all line up. Like below

rryrtt wer ytwrety wrt 234.00
sdssdf sdg dgsdrg dg 1234.00

I can align a line right or left but not parts of a line. This
is why I tried using tables as one would do in a Word doc.

May be I'm asking to much from the components!

Rgds
Des Tuff
Back to top
Oliver Townshend
Guest





PostPosted: Tue Sep 27, 2005 9:23 pm    Post subject: Re: WORD_TLB Type Library Compilation Error Reply with quote

Quote:
I can align a line right or left but not parts of a line. This
is why I tried using tables as one would do in a Word doc.

May be I'm asking to much from the components!

I've written piles of invoices using RTF for different systems, and I've
always used tables. I don't understand why you can't save the table in an
RTF file. It's very simple.

Oliver Townshend



Back to top
Display posts from previous:   
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> Delphi OLE Automation All times are GMT
Goto page 1, 2  Next
Page 1 of 2

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2006 phpBB Group
SEO toolkit © 2004-2006 webmedic.