Hi Allan,
Sorry I kinda jumped the gun there. I assumed PaperSource was an enumeration and just took some code I had that worked on a different enumeration and changed the type names. I wish the UT text editor could check sample code for compile errors.
Anyway, I did some more investigation and found how to do this. It's ugly but this snippet works:
Imports System.Drawing.Printing
...
Dim doc As New PrintDocument
Dim psk As PaperSourceKind
psk = CType([Enum].Parse(GetType(PaperSourceKind), "Upper"), PaperSourceKind)
For Each ps As PaperSource In doc.PrinterSettings.PaperSources
If ps.Kind = psk Then
doc.DefaultPageSettings.PaperSource = ps
Exit For
End If
Next
I hope this helps.