Experts Exchange connects you with the people and services you need so you can get back to work.
Improve company productivity with a Business Account.Sign Up
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
Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.
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.
Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.
Have a better answer? Share it in a comment.
Please enter a first name
Please enter a last name
Must be at least 4 characters long.
Join and Comment
From novice to tech pro — start learning today.
Premium members can enroll in this course at no extra cost.