you can use DIR to return a file /folder name string from wildcardIs there any way the VBA code can be made to save the email in the folder "0010-Test" folder when only the 0010
if only 1 folder is found that matches, you can use it directly, else you have to determine which to useCode:root = "C:\email\" num = inputbox("enter folder number") fold = dir(root & num & "*", vbdirectory) do while len(fold) > 0 if getattr(root & fold) and vbdirectory then foldlist = root & fold & vbnewline fold = dir loop if len(foldlist) = 0 then foldlist = "none" msgbox "the following folders were found that match the entered folder number" & vbnewline & foldlist




Reply With Quote