How to reference the selected folder

Status
Not open for further replies.

Kovenna

New Member
Outlook version
Outlook 2010 64 bit
Email Account
Outlook.com (as MS Exchange)
I would like to move a selected mail item in the Inbox to a selected sub-folder of the Inbox. But I have no idea how to reference "active" or "Selected" folder. I can make a folder the selected folder (for example: Set ActiveExplorer.CurrentFolder = objCurFolder) but I cannot seem to find any sources explaining how to reference this folder once it is the "selected" folder.

Can anyone help?
 

Diane Poremsky

Senior Member
Outlook version
Outlook 2016 32 bit
Email Account
Office 365 Exchange
This shows how to work twith the current item - Outlook VBA: Work with Open Item or Selected Item
current folder is similar.

Dim objOL As Outlook.Application
Set objOL = Outlook.Application
Set objFolder = objOL.ActiveExplorer.CurrentFolder
 
Status
Not open for further replies.
Thread starter Similar threads Forum Replies Date
S Reference Custom Fields with VBA Outlook VBA and Custom Forms 2
Alex Cotton "invalid or unqualified reference" on code that should work Outlook VBA and Custom Forms 5
F want inbox on toolbar to reference icloud messages Using Outlook 2
N VBA Outlook reference to Excel and assigning category Outlook VBA and Custom Forms 13
U Reference Text for VBA for outlook Outlook VBA and Custom Forms 1
M Is there a reference for the valid XML tags and their options? Calendar Printing Assistant 3
N Providing a reference to incoming mail in outlook 2007 BCM (Business Contact Manager) 2
F Saving mail for future reference. Using Outlook 1
M BCM error: Object reference not set to an instance of the object. Got this msg. BCM database will Using Outlook 2
K Exchange 2010 ECP Reports - search for emails from external recepient get 'Object Reference not set to an instance of an object' error Exchange Server Administration 4
I An error occurred with error code '3221685232' and message 'An attempt was made to reference a token that does not exist. Exchange Server Administration 4
S redemption reference Outlook VBA and Custom Forms 1
C Shared Calendar Recipient Reference Outlook VBA and Custom Forms 1
B Change row background color of selected item Using Outlook 1
T Change the selected Message in the Outlook window Outlook VBA and Custom Forms 2
H Custom Signature Not Displayed When Account Selected Outlook VBA and Custom Forms 10
J Checkboxes when selected will appear in a textbox in Outlook 2016 Outlook VBA and Custom Forms 1
R VBA Code to permanently delete selected email Outlook VBA and Custom Forms 10
P Outlook 2013 opens with FILE tab selected. Using Outlook 3
C Change Subject Line in Selected Emails Outlook VBA and Custom Forms 1
G Autocomplete adds suspicious "@unknown.email" to selected contacts Using Outlook 1
D Saving Selected Emails as PDF and saving Attachments Outlook VBA and Custom Forms 6
D Print Attachments only in selected emails using a macro Outlook VBA and Custom Forms 3
O On click,I want to change subject line of selected mail and then reply to particular email and move Using Outlook 3
B Macro to manually move selected emails to network folder Outlook VBA and Custom Forms 1
M code to move selected Outlook contacts to another folder Using Outlook 3
A Helping OL remember which calendars were selected Using Outlook 6
Diane Poremsky Save Selected Email Message as .msg File New Slipstick.com Articles 11
D Delete selected text from incoming emails Outlook VBA and Custom Forms 25
mikolajek Random message selected after hard delete Using Outlook 4
Diane Poremsky Working with All Items in a Folder or Selected Items New Slipstick.com Articles 0
Diane Poremsky Outlook VBA: Work with Open Item or Selected Item New Slipstick.com Articles 0
A VBA to create meeting from template from a time slot selected in someone's calendar Outlook VBA and Custom Forms 5
Diane Poremsky Create Task or Appointment and Insert Selected Text New Slipstick.com Articles 0
Yusufbodrum Highlighting selected mails in any folder Using Outlook 2
P Subject change on selected emails Outlook VBA and Custom Forms 14
C Autofill subject line in appointment from options selected in combobox Using Outlook 6
P Is it possible to write a macro to email to all addresses of selected contacts? Using Outlook 1
I Save selected email message as .msg file (with user to choose folder location) Outlook VBA and Custom Forms 14
S Macro to print & move selected emails? Using Outlook 3
L Selected Contacts For E-Mails Using Outlook 19
K Help! I selected every contact and mistakenly made them all the same category Using Outlook 1
C Outlook 2010 Address Book, won't stay selected Using Outlook 5
L Outlook 2007 E-Mail From Selected Task Using Outlook 18
L Email For Selected Contacts Using Outlook 5
D Trigger macro to run when selected email is opened Using Outlook 3
D Launch Outlook showing only selected messages. Using Outlook 1
J Capturing forward event when multiple items are selected Using Outlook 0
S Printing Selected Date Range in Monthly Style Using Outlook 1
P Export selected contacts to a .csv Using Outlook 2
Similar threads


















































Top