We want to automate OpenOffice, When i search on internet couldnot find a end-to-end help for that and delphi examples are too less. Our intention is to insert document variables and replace the document variable with there values and copying paragraphs etc.
Can any one help me to find an end-to-end help or a pas file like word2000.pas where i can find all the word routines.
Thanks,
Basil
I do use OpenOffice-Automation with Delphi a lot and I think there is no "wrapper" with higher functionality for Delphi.
There is a Delphi OO Project on SourceForge with helpers and examples as a starting point: http://sourceforge.net/projects/ooomacros/files/Delphi%20OOo/Version%201.2/Delphi_OOo_v12en.zip/download
Then you have to study the UNO-API and use COM to call the UNO functions.
You can find a lot of updated information here:
https://www.freepascal.org/~michael/articles/openoffice1/openoffice.pdf
Related
I need to parse Delphi .pas files to work with classes with read/write ability. Adding/Modifying/Deleting fields, properties, methods etc. Any idea how to implement this? The implementation is not necessarily in Delphi, scripting languages are also allowed.
There is the Castalia Delphi Parser by Jacob Thurman currently hosted on GitHub.
CnWizards have built-in syntax highlighter so they use some parser too, but I do not remember which exactly. You can look into their sources at https://github.com/cnpack/cnwizards
PasParse is good for you ! Delphi port of the excellent (C#) DGrok.
Delphi 2007 level.
All I could find is a simple example and a manual in VB which is not the same objects as Delphi.
Edit: So there is no manual. Where could I find the code that translates the Delphi code to access the OLE calls?
In the current state, there is a guessing game with the Delphi as , how vb is translated to the Delhpi.
I doubt which exist such manual, the official source is the Microsoft Word Object Model Reference, The samples are in VB but you can easily translate to delphi. All these objects and properties are accesible via delphi or any language which supports COM.
Deborah Pate's website may be "old" (~ Delphi 5) but still has valuable advice and examples in Delphi: http://www.djpate.freeserve.co.uk/Automation.htm
The authoritative source is the Word Object Model Reference on MSDN. There is nothing better. It's not written using Delphi syntax but you just have to live with that.
Charlie Calvert's articles on the Embarcadero Developers Network are very good as well. The articles are not linked to each other, so all url's are shown below:
Delphi 3 - Delphi and Microsoft Office: Automating Excel and Word
by Charlie Calvert, pages 1 - 5:
http://edn.embarcadero.com/article/10126
http://edn.embarcadero.com/article/10127
http://edn.embarcadero.com/article/10128
http://edn.embarcadero.com/article/10129
http://edn.embarcadero.com/article/10130
Delphi and Word Part II by Charlie Calvert, pages 1 - 3
http://edn.embarcadero.com/article/10043
http://edn.embarcadero.com/article/10382
http://edn.embarcadero.com/article/10383
Has anyone used the ICU ( see http://site.icu-project.org/ ) DLLs from Delphi?
Specifically I'm interested in the Code Page Conversion and Collation functions.
Looking at the header files it would appear that they are mostly in C++ using classes, so without having done much research yet, I would assume that it's necessary to create a simple wrapper around this that exports simple functions which can easily be imported in Delphi.
Has anyone done any work for that yet?
Or can anyone recommend a different solution for Delphi that has similar extensive coverage for codepages and collation orders?
I don't use it, but there's a very complete translation called ICU4PAS that wraps the DLLs and provides a nice Delphi-based interface.
i want my own pascal code to be executed it also have some uses files and other complex functions just like a Delphi code can i do this
Yes:
http://www.remobjects.com/ps.aspx
This component is used in the highly popular Inno Setup installer software.
Delphi Web Script is now under active development again.
Previously it was good; now it is becoming great.
You can download it on Google Code.
--jeroen
Another option, which is useful if you want to support more than just Pascal syntax, would be Fast-Script by the makers of Fast-Report.
There's also paxCompiler
Depends how much pascal you want to interpret. Pascal Script will interpret most stuff but you can't declare classes in a script (You can however import them using script functions). You can't use "uses" clauses either.
If you want to do full on pascal support you're going to have to compile it. You could probably use the FreePascal one providing your app's licensing is compatible (GPL).
TMS has both a scripting engine and a scripting IDE product.
I'm using delphi6, and it lacks the following abilities:
a library object,
a list object(looks like TList,TStringList is good enough?)
a algorithm library(like sort,)
template library like STL
dynamic language feature or GC.
and so on.
how can I find this things?
Try Jedi Code Library. There are good replacements for container classes and sorting algorithms. I don't think there is GC or STL-like library for Delphi 6.
Delphi 6 is behind the times, check Delphi 2009 or at least Turbo Delphi
There is DeCAL, which claims to be similar to the STL. I've never really tested it, however.
There are many third party delphi libraries, components and source code examples on the net.
Just a couple off the top of my head
JEDI http://www.delphi-jedi.org/
and
a Delphi super page http://delphi.icm.edu.pl/
As an alternative to DeCAL (Which is a very good alternative to TList without generics), I will propose EZSDL by Julian M Bucknall.
List of main third party components compatible with Delphi 2007 for Win32 and RAD Studio 2007 by Andreano Lanusse at http://edn.embarcadero.com/article/37455
The first three are in the VCL, take a look in the help and the sources. Delphi 6 has no generics, so cannot be used with a template library. And no garbage collection.
If you want to program in Delphi, forget about them. If not, find another language.