[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now


Outlook Macro form to move bulf folders.

Posted on 2010-01-07
Medium Priority
Last Modified: 2012-05-08

Outlook Macro form to move bulf folders.
This is a related post. in the form when clicked a button can i get select all. So all are selected in one shot if needed.

Below code from David.

Question by:bsharath
  • 3
  • 3
LVL 76

Accepted Solution

David Lee earned 2000 total points
ID: 26213115
Hi, Sharath.

Here's how to do this.

1.  Open Outlook's VB editor (ALT+F11).
2.  Expand Project1, expand Forms, and select the form in question.
3.  Add a CommandButton control to the form.
4.  Select the newly added button.
5.  In the Properties pane set the control's name to "cmdSelectAll" and caption to "Select All".
6.  Right-click on the form and select "View Code".
7.  When the code window opens add the subroutine below to the code that's already there.
8.  Save the changes.

That should do it.
Private Sub cmdSelectAll_Click()
    Dim intIndex As Integer
    For intIndex = 0 To lbFolders.ListCount - 1
        lbFolders.Selected(intIndex) = True
    bolSelected = True
End Sub

Open in new window

LVL 11

Author Comment

ID: 26268468
Thanks David works perfect...
When i select all i dont want it to take me to the place to Move.
i want it to wait till i select 'Select"
So if i want to remove few checkboxes i can do it
LVL 76

Expert Comment

by:David Lee
ID: 26272592
Ok.  Remove lines 6 and 7 of the code above.
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

LVL 11

Author Comment

ID: 26273654
Thanks david works perfect....
LVL 76

Expert Comment

by:David Lee
ID: 26273722
You're welcome.

Featured Post

Hire Technology Freelancers with Gigs

Work with freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely, and get projects done right.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Windows Explorer lets you open cabinet (cab) files like any other folder. In VBA you can easily handle normal files and folders, but opening and indeed creating cabinet files takes a lot more - and that's you'll find here.
Today as you open your Outlook, you witness an error message: “Outlook is using an old copy of your Outlook Data File…”. Probably, Outlook is accessing an old OST file.
This video shows how to remove a single email address from the Outlook 2010 Auto Suggestion memory. NOTE: For Outlook 2016 and 2013 perform the exact same steps. Open a new email: Click the New email button in Outlook. Start typing the address: …
This lesson discusses how to use a Mainform + Subforms in Microsoft Access to find and enter data for payments on orders. The sample data comes from a custom shop that builds and sells movable storage structures that are delivered to your property. …

872 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question