OberonPlace.com Forums  

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

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 26-01-2004, 07:55
ddonnahoe's Avatar
ddonnahoe ddonnahoe is offline
Senior Member
 
Join Date: Jan 2004
Location: Louisville, KY
Posts: 552
Send a message via ICQ to ddonnahoe Send a message via AIM to ddonnahoe Send a message via MSN to ddonnahoe Send a message via Yahoo to ddonnahoe
Default Export filter compile error

This is a responsed to my last post. I am having trouble trying to figure out why I keep getting this error. Within the following code:
Code:
Private Sub cmdGo_Click()
    Dim f As ExportFilter
    Dim d As Document
    ' Check for Jpeg
    If cbxJPG.Value = True Then
        Set f = d.ExportBitmap("C:\Documents and Settings\Artist\Desktop\" & txbFile.Text & ".jpg", cdrJPEG, cdrCurrentPage, cdrRGBColorImage, 0, 0, 72, 72)
    With f
        .Compression = 100
        .Optimized = True
        .Smoothing = 100
        .SubFormat = 1
        .Progressive = False
        .Finish
    End With
    End If
    
    If cbxAI.Value = True Then
        'insert AIexport here
    End If
    
End Sub
I get the error shown below. It happens in the...
Code:
Set f = d.ExportBitmap("C:\Documents and Settings\Artist\Desktop\" & txbFile.Text & ".jpg", cdrJPEG, cdrCurrentPage, cdrRGBColorImage, 0, 0, 72, 72)
...line. I can't seem to figure out why it keeps asking my this. I set them Dims already and it works earlier in the code. I have changed the variables from the earlier code from
Code:
Dim Filter As ExportFilter
to
Code:
Dim f As ExportFilter
Someone please help!!!!
Attached Images
 
__________________
Sean
Waiting for a ride in the T.A.R.D.I.S.
Reply With Quote
  #2  
Old 26-01-2004, 09:15
Alex's Avatar
Alex Alex is offline
Administrator
 
Join Date: Nov 2002
Posts: 1,940
Blog Entries: 4
Default Re: Export filter compile error

Your problem is because your object variable d is not set to anything. You probably wanted to do something like:

Code:
Set d = ActiveDocument
before you use it in ExportBitmap command.
Reply With Quote
Reply


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
HPGL export problem Anonymous General 1 16-02-2006 09:15
Problem with Export (or Save as) in AI-Format LOT CorelDRAW/Corel DESIGNER VBA 3 10-02-2004 14:28
EMF filter jivoien CorelDRAW/Corel DESIGNER VBA 5 06-01-2004 23:54
"Unexpected condition" error message (with code) s_federici CorelDRAW/Corel DESIGNER VBA 10 10-07-2003 21:46
"Object too complex" error dcsquare CorelDRAW/Corel DESIGNER VBA 0 25-05-2003 10:13


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


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