OberonPlace.com Forums

OberonPlace.com Forums (http://forum.oberonplace.com/index.php)
-   CorelDRAW/Corel DESIGNER VBA (http://forum.oberonplace.com/forumdisplay.php?f=16)
-   -   bug in x5/vba with ColorConversionOptions? (http://forum.oberonplace.com/showthread.php?t=7601)

seelenquell 01-04-2011 06:47

bug in x5/vba with ColorConversionOptions?
hi there,

i just discovered a small bug probably.

dim file as string
file = "c:\test.cdr"
Dim openopt As New StructOpenOptions
Set openopt = CreateStructOpenOptions
openopt.ColorConversionOptions.ColorPolicy.WarnOnMismatchedProfiles = True
openopt.ColorConversionOptions.ColorPolicy.WarnOnMissingProfiles = True
Dim doc1 As Document
Set doc1 = OpenDocumentEx(file, openopt)

when starting this script, corel should open this file. if you haven´t saved any profile in this corel-file or the version is below x5 there should be a profile-dialogue (if you have selected this in the color-options) before the file is opened.
but there isn´t any dialogue. when i open this file with the standard-open-document-menupoint, the dialog is coming. through script it isn´t.

can anyone confirm this? i also tried the normal "opendocument" but there it´s the same.

Alex 06-04-2011 23:31

Macros never show dialogs (in some cases, you can show a dialog by using special commands or options). This is by design. You can specify the profiles in code.

seelenquell 08-04-2011 01:29

mmh then i interpreted something wrong here:


Property WarnOnMismatchedProfiles As Boolean

Member of ColorManagementPolicy

The WarnOnMismatchedProfiles property specifies whether to display a warning for a mismatch between color profiles.

when i open a corel-file per script, i want to select a profile when there is none (for example when opening a <X5-file)

update: just found a working dirty solution:

ShellExecute 0, vbNullString, file, vbNullString, vbNullString, 5
'file' stands for the filename with complete path

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

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