pigiloop

SetCustomData

Dec 28th, 2021
4,497
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. Sub SetCustomData(doc, key, value)
  2.     On Error GoTo ErrorHandler
  3.     If value = "" Then
  4.         doc.SummaryInfo.GetCustomByKey key, value
  5.     Else
  6.         doc.SummaryInfo.SetCustomByKey key, value
  7.     End If
  8.    
  9.     Exit Sub
  10. ErrorHandler:
  11.     doc.SummaryInfo.AddCustomInfo key, value
  12.     Resume Next
  13. End Sub
Advertisement