OberonPlace.com Forums  

Go Back   OberonPlace.com Forums > Developer Forums > VBA > CorelDRAW/Corel DESIGNER VBA

Thread Tools Search this Thread Display Modes
Old 07-03-2006, 11:52
Posts: n/a
Question How to use library CdrInfoFilter110.dll

Good afternoon! Me any information interests, on library CdrInfoFilter110.dll As it can be used in project VBA? In particular, as it is possible to receive quantity of pages of the document of the certain file. I shall be grateful for any information

P.S. I badly know English, therefore I use a translation program
Reply With Quote
Old 09-03-2006, 13:56
Posts: n/a

You can get the number of pages of an opened file with ActiveDocument.Pages.Count. But I think you don't want to open it, so ...

CdrInfoFilter110.dll is an ActiveX dll. Add reference to it in Tools>References>Browse...
and try the following code:
Sub FilePagesInfo()
Dim inff As CDRInfo
Dim ver As Long, pages As Long, f As String
f = "c:\tst.cdr"
ver = CorelScript.GetCDRFileVersion(f)
If ver <= 11 And ver > 5 Then
With inff
.AttachAndReadFileVBA (f)
.GetNumPages pages
End With
Set inff =Nothing
MsgBox f & vbCrLf & "Version = " & Str(ver) & vbCrLf & "Pages count = " & Str(pages)
MsgBox f & vbCrLf & "Unknown version"
End If
End Sub
I don't check the existance of a file in the sample. CdrInfoFilter110.dll will work only with files which version is between 6 an 11 (as I remember). I don't show here how to get file version for any file (It's rather simple). For higher versions you need the new version of the dll.
Reply With Quote
Old 10-03-2006, 12:25
Posts: n/a

Here it appears where the dog is buried.
I tried .AttachAndReadFile () and all time received "Automation Error"

Many thanks! All Work
Reply With Quote

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Question about the Library Symbol Docker Hernán General 2 27-05-2005 16:30
Can't find project or library ddonnahoe CorelDRAW/Corel DESIGNER VBA 1 10-05-2005 15:31
Oberon Type Library Tools Alex Other Oberon Commercial Products 4 21-04-2005 06:45
CorelDraw12 CommandBars and VGCore library jmp CorelDRAW/Corel DESIGNER VBA 2 10-02-2004 10:29
opendocument doesn't work in a VB project s_federici CorelDRAW/Corel DESIGNER VBA 7 17-06-2003 10:43

All times are GMT -5. The time now is 11:36.

Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2022, Jelsoft Enterprises Ltd.
Copyright © 2011, Oberonplace.com