Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

OL2010 - Printing attachment info

Status
Not open for further replies.

techseek

MIS
Nov 5, 2010
97
US
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
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top