joan said:Does anyone know a workaround for that issue?
Hi.
Not sure what the issue is actually. It should convert everything in the page to an ai file regardless of page orientation.
~John
Replace this section in frmFileConvertor Code:
'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
nStage = 1 ' Opening a file Set d = Nothing CurFileName = frmSourceSelection.lstSelectedFiles.List(n) If cboFileFormat.Text <> CDR_FILE And cboFileFormat.Text <> DES_FILE And cboPageSize <> "Auto" Then If PageAsSeparateFile And UCase$(Right$(CurFileName, 4)) = ".CDR" Then Set d = OpenDocument(CurFileName) Else Set d = CreateDocument d.ActiveLayer.Import CurFileName, , si End If Else Set d = OpenDocument(CurFileName) End If If UseBackgroundColor Then SetBackgroundColor End If If d.Pages.Count > 1 Or d.SelectableShapes.Count > 0 Then nStage = 2 ' Processing the file 'set the page size If UsePage And cboPageSize <> "Auto" Then If cboUnits.ListIndex = 0 Then d.Pages(0).SetSize Val(txtPageHeight.Text), Val(txtPageWidth.Text) Else d.Pages(0).SetSize Val(txtPageHeight.Text / INCHES_TO_MILLIMETERS), Val(txtPageWidth.Text / INCHES_TO_MILLIMETERS) End If End If
If cboPageSize = "Auto" Then If d.Pages(1).Orientation = cdrLandscape Then ActivePage.Orientation = cdrLandscape Else ActivePage.Orientation = cdrPortrait End If End If nStage = 3 ' Saving the file
Also i added one line here:
AddPaperType "Custom", 0, 0, True AddPaperType "Auto", 0, 0, True cboPageSize.Clear '<<added this line................... For Each p In PaperTypes cboPageSize.AddItem p.Name Next p
Just change paper size to Auto and run.
Thanks Joan.
RGB seems to be default for AI files so that could be why it exports as RGB without having the box checked.
You can play with these settings.I added the one line here.I put a little code before and after for context.
I was unable to generate the error you mentioned by clicking advanced settings.
Else Set se = CreateStructExportOptions End If se.UseColorProfile = ApplyColorProfile '<<try commenting out or setting to false se.ImageType = cdrCMYKColorImage '<<added. 'SourceDir = txtSource.Text DestDir = txtDestination.Text