Hi. I'd like to add a progress bar to this macro so I know it worked or is processing. Any help out there?
code below:
1 2 3 4 5 6 7 8 9 10 11 12 13 14
Sub Go() Dim dn As String, ps As PDFVBASettings Set ps = ActiveDocument.PDFSettings If ActiveDocument.Dirty Then ActiveDocument.Save On Error GoTo ErrHandler 'ps.ShowDialog dn = Left$(ActiveDocument.FullFileName, Len(ActiveDocument.FullFileName) - 4) & ".pdf" ActiveDocument.PublishToPdf dn ExitSub: Exit Sub ErrHandler: MsgBox "Error occured: " & Err.Description & Err.Number Resume ExitSub End Sub
Public Sub RunTask() Implements ICUIBackgroundTask.RunTask Running = True SavePDF End Sub Protected Sub SavePDF() Try app.ActiveDocument.PublishToPDF(filename) Catch ex As Exception app.FrameWork.ShowMessageBox(ex.Message) End Try Return End Sub
What about something using this ------^
Just tested in X8 - all is working, draws color line which has fills by green color (:
shark_ said:Just tested in X8 - all is working, draws color line which has fills by green color (:
I just tried it in X8, and the macro runs, but I see no progress bar.
Are you running 64-bit CorelDRAW? Or 32-bit?
64-bit CorelDraw , Win 7
try insert DoEvents in for-next.
Hm, found strange thing. If simply to run code, then nothing happens. But if make two step to stat.BeginProgress then shows progressbar and after this i can run macro without step-by-step
shark_ said:64-bit CorelDraw , Win 7
I am also running 64-bit Draw on Win 7.
I wish I knew what was going on with this, because some of my macros would be nicer if I could use the progress bar.
i am trying to use Application.Status against stat. All working, but similar. Run code - nothing. Run step-by-step to "Application.Status.BeginProgress" - a status bar appears and then i can run the macro in normal mode, draws green progress bar