How to choose from a list of templates in a shared drive folder

Status
Not open for further replies.

Kieren

New Member
Outlook version
Outlook 2010 32 bit
Email Account
Exchange Server
Hi, I have a few issues I'm needing help with but this is the biggest one for me right now.

I'm trying to create something where a user will press a button and have a list of templates in a shared drive folder pop up, which they can select from. The list needs to automatically refresh every time the button is pressed, as templates will be added and removed from that folder.

I assume a combobox form would be a good start to this, but I'm not sure how to proceed. Any help would be appreciated.
 
With VBA you cannot add anything to the ribbon. You could add a UserForm to the VBA project, and place a combobox on it. On the QAT you could manually place a button to display the form.
 
With VBA you cannot add anything to the ribbon. You could add a UserForm to the VBA project, and place a combobox on it. On the QAT you could manually place a button to display the form.

I suppose I wasn't quite clear. I'm having trouble figuring out how to dynamically update a combobox with a list of templates in a file system directory.

As of right now I can use .AddItem and manually add in items to the drop down and then use Case 0, 1, 2 etc to modify a template string to open a specific file in the directory based on what is selected.

What I'm trying to do is have it so the combobox is automatically filled with the list of files in a directory, and selecting that file will open that template. So the combobox will dynamically show what is in the directory rather than having to hardcode in the names and location.

I was using this as a basic: http://www.slipstick.com/developer/code-samples/vba-userform-sample-select-list-templates/
 
Okay, so I have a crude solution to display the files in the combobox using

With ComboBox1
Dim MyFile As String
My File = Dir("Directory Path)
Do While Myfile <> ""
.AddItem MyFile
MyFile = Dir()
Loop
End With
End Sub

Now I need some assistance in selecting the correct template in the folder based on what was selected in the combobox, if someone would be able to help me out with that would be very appreciated!
 
Okay got that figure out too lol using strTemplate = UserForm1.ComboBox1.Text
Probably not pretty but it works.

Last thing I need help with here is if there's any way to remove the file name type in the combobox using my above code? Right now it will list things as "Default.oft" etc, I'd like to remove the .oft.
 
Use the InstrRev function. With it find the position of the last dot in the string. Once you know its position, you can use the Left function to return only the part left of the dot.
 
Status
Not open for further replies.
Similar threads
Thread starter Title Forum Replies Date
D multiple email accounts - why do I have to choose the "from" account address?? Using Outlook 2
J outlook 2007 doesn't let me choose which .pst to search Using Outlook 2
R "Can't store Outlook data files under the AppData folder. Please choose another folder." Using Outlook 6
O Benefits of Exchange over IMAP and why would I choose Exchange? Using Outlook 2
Diane Poremsky Choose the Folder Outlook Starts Up In Using Outlook 0
B Choose commands from Macros is empty Outlook VBA and Custom Forms 3
S Choose-outlook-startup-folder with VBA Outlook VBA and Custom Forms 6
Diane Poremsky How to choose which Calendar creates reminders? Using Outlook 0
M Save selected email message as .msg file (with user to choose folder location) Outlook VBA and Custom Forms 14
M Outlook displays "choose folder" for each sent item. Using Outlook 2
L How do i choose where i file my sent messages? Using Outlook 1
J how to choose which item alone go to pst ? OR how to auto sync/copy calender Using Outlook 1
C Outlook 2007 - Recover Deleted Items - Columns to Choose from Using Outlook 1
B How to choose which contacts folder to use when saving contacts? Using Outlook 1
F Choose Which Calendar/PST Creates Reminder Using Outlook 3
farrissf Category list to pick from Outlook VBA and Custom Forms 4
R Outlook 2019 VBA to List Meetings in Rooms Outlook VBA and Custom Forms 0
S Inconsistent view of To-Do List Using Outlook 0
S Different views for To-Do List and To-Do Bar Using Outlook 1
R Adding Userform Dropdown List items from names of subfolders on network drive Outlook VBA and Custom Forms 10
K Daily Task List Minimized Cannot Display Using Outlook 5
S Outlook 2021 Can you make emails from 3 word domains "safe" by entering top 2 word domain into Safe List in Outlook? Using Outlook 1
E Outlook - Macro - send list of Tasks which are not finished Outlook VBA and Custom Forms 3
L Capture email addresses and create a comma separated list Outlook VBA and Custom Forms 5
D VBA code to select a signature from the signatures list Outlook VBA and Custom Forms 3
L Checking Sender Email Address for trusted domain from list on intranet Outlook VBA and Custom Forms 4
NVDon Create new Move To Folder list Outlook VBA and Custom Forms 0
Ken Pascoe Outlook Categories Quick List Using Outlook 0
O Outlook 2010 Add delete button to the side of the message list Using Outlook 1
G Forward email body to other mail list directly from Exchange server Exchange Server Administration 1
N How do I make Outlook autocomplete addresses from a list of recognised <full_names> only? Using Outlook 2
T Outlook 2010 Tasks are not visible in To Do list Using Outlook 5
C must select message to trigger safe list Using Outlook 3
N contact list seen in Contact folder but knot in Address book or when 'TO' button is clicked in new email Using Outlook 0
V Pin a document to the "Attach file" Recent Documents list Using Outlook 0
T Junk Email does not get added to the Blocked Sender List Using Outlook 0
Witzker print-list-of-outlook-folders with sort posibility Outlook VBA and Custom Forms 7
F Junk Email does not get added to the Blocked Sender List Using Outlook 4
G Move tasks up/down todo list by VBA Outlook VBA and Custom Forms 1
E Asking user to select multiple options in a list in an email Outlook VBA and Custom Forms 0
C Why won't Title display in message list? Using Outlook 1
T Increasing the number of items that appear on the Categories list Using Outlook 2
J Edit auto-complete list in Outlook 2016+/365? Using Outlook 0
M Changing the preferred order for "Put this entry in" list for adding new contacts to the Address Book Using Outlook 1
R List folders in a combo box + select folder + move emails from inbox to that folder + reply to that email Outlook VBA and Custom Forms 1
Z See "Change View" Drop Down as a List? Using Outlook 1
Z How to show concatenated categories in list task view? Using Outlook 2
M How can we find the list of users who are members of a deleted distribution list? Exchange Server Administration 2
B Outlook 365 - Folder pane list clears Using Outlook 28
B All imported tasks appear in to-do list Using Outlook 3

Similar threads

Back
Top