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
Sub TestProgressBar()Const Max = 10000000Dim stat As AppStatus, z& Set stat = Application.Status stat.BeginProgress "Working...", True ' word "working" for some reason is not shown, in X3 - shows For z = 1 To Max stat.Progress = (z / Max) * 100 Next stat.EndProgressEnd Sub
grogo and Eskimo - how do you insert your code in the answers, so that the keywords are highlighted there?
shark_ said:grogo and Eskimo - how do you insert your code in the answers, so that the keywords are highlighted there?
I use the hilite.me web site, with VB.net as the language.
To paste in the HTML that it generates, use Tools>Source Code in the editor on the forum.
Thank you for sharing that.
That works for me in X5, but not in X7 (or newer) versions of CorelDRAW.
Thank you!