Save print time to file.

Hello all,

Is it possible to save a correct time of when a macro is run, in e.g. a .txt file?

I have this macro:

Dim swApp As Object
Dim Part As Object
Dim SelMgr As Object
Dim boolstatus As Boolean
Dim longstatus As Long, longwarnings As Long
Dim Feature As Object
Sub main()

Set swApp = Application.SldWorks

Set Part = swApp.ActiveDoc
Set SelMgr = Part.SelectionManager
Part.PrintDirect
fName = "c:\SWAXI_TegningsNummer.csv"
Open fName For Input Access Read As #1

While Not EOF(1)
    Line Input #1, TName
Wend
Close #1

PDF = "I:\USER\FAELLES\DWF\S\" + Mid(TName, 10, 9) + ".PDF"
Part.SaveAs2 PDF, 0, False, True

EndMacro:
End Sub

Which Prints a hardcopy and a PDF to a certain location.

Could I get it to save a correct time for that print on the "c:\print time" or something like that?

Cheers

SolidworksApi macros