Dim myOlExp As Outlook.Explorer
Dim myOlSel As Outlook.Selection
Dim oMail As Outlook.mailItem
Dim x As Long
Set myOlExp = Application.ActiveExplorer
Set myOlSel = myOlExp.Selection
BaseKey = HKEY_CURRENT_USER
KeyName = "Software\Microsoft\Windows NT\CurrentVersion\Windows"
ValueName = "Device"
DefaultPrinter = RegistryGetValue(BaseKey, KeyName, ValueName)
DuplexPrinter = "Name_of_duplex_printer"
'Change to duplex printer
RegistryUpdateValue BaseKey, KeyName, ValueName, DuplexPrinter
'Print out each email selected
For x = 1 To myOlSel.count
If myOlSel.Item(x).Class = OlObjectClass.olMail Then
Set oMail = myOlSel.Item(x)
'Reinstate original default printer
RegistryUpdateValue BaseKey, KeyName, ValueName, DefaultPrinter
Open in new window
Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.
One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.
Here at Experts Exchange, we strive to give members the best experience. Help us improve the site by taking this survey today! (Bonus: Be entered to win a great tech prize for participating!)