Hello
I am not very experienced with VB. I've found some some code which creates a report of email message attachment info and then creates/attaches/saves the report. I just wish to create the report and print it. Here is the report creation portion:
Public Function GetAttachmentInfo(attachment As attachment)
On Error GoTo On_Error
Dim Report
GetAttachmentInfo = ""
Report = Report & "Block Level: " & attachment.BlockLevel & vbCrLf
Report = Report & "Display Name: " & attachment.DisplayName & vbCrLf
Report = Report & "File Name: " & attachment.FileName & vbCrLf
Report = Report & "Index: " & attachment.Index & vbCrLf
Report = Report & "Path Name: " & attachment.PathName & vbCrLf
Report = Report & "Position: " & attachment.Position & vbCrLf
Report = Report & "Size: " & attachment.Size & vbCrLf
Report = Report & "Type: " & attachment.Type & vbCrLf
GetAttachmentInfo = Report
Exiting:
Exit Function
On_Error:
MsgBox "error=" & Err.Number & " " & Err.Description
Resume Exiting
End Function
How do I print it? I had no luck with ShellExecute
Thank you for any input
I am not very experienced with VB. I've found some some code which creates a report of email message attachment info and then creates/attaches/saves the report. I just wish to create the report and print it. Here is the report creation portion:
Public Function GetAttachmentInfo(attachment As attachment)
On Error GoTo On_Error
Dim Report
GetAttachmentInfo = ""
Report = Report & "Block Level: " & attachment.BlockLevel & vbCrLf
Report = Report & "Display Name: " & attachment.DisplayName & vbCrLf
Report = Report & "File Name: " & attachment.FileName & vbCrLf
Report = Report & "Index: " & attachment.Index & vbCrLf
Report = Report & "Path Name: " & attachment.PathName & vbCrLf
Report = Report & "Position: " & attachment.Position & vbCrLf
Report = Report & "Size: " & attachment.Size & vbCrLf
Report = Report & "Type: " & attachment.Type & vbCrLf
GetAttachmentInfo = Report
Exiting:
Exit Function
On_Error:
MsgBox "error=" & Err.Number & " " & Err.Description
Resume Exiting
End Function
How do I print it? I had no luck with ShellExecute
Thank you for any input