Automatic file name and save date

Can anyone suggest a smart way to automatically insert a text box with file name and date when the document was saved.

Best regards Flemming

Parents
No Data
Reply
  • Private Sub GlobalMacroStorage_DocumentAfterSave(ByVal Doc As Document, ByVal SaveAs As Boolean, ByVal FileName As String)
    'Hello!
    'The easiest way is to put this code in GlobalMacros.gms, ThisMacroStorage section.
    'This way, the message will appear when every document is saved.
    'After putting this code in GlobalMacros.gms CorelDRAW must be restarted
    'Greetings!
    MsgBox ActiveDocument.Name & " IS SAVED" & Chr(13) & Date & " " & Time & Chr(13) & "A nice day from BhBp.bg2", , "BhBp.bg2 Message"
    End Sub

    It is possible to modify the code in many ways. 
    For example, if you want to copy the result to the clipboard and paste it,
    the code should be embedded in a userform with a text field to put the name
    of the saved file. Another option is to directly paste the name and
    date and time of the recorded file into a Word document or
    Excel table or Access DB Field, etc.
Children
No Data