#Long path tool 4shared portable#
Since this is a portable program, it is important to mention that it doesn’t leave any traces in the Windows Registry, and you can copy it on any USB flash drive or other devices, and take it with you whenever need to scan your computer for long path files and delete them on the breeze. ' .InlineShapes.LONG PATH Tool is a lightweight application designed with a single goal in mind: to get rid of the blocked and long path files from your computer. ' If ActiveInspector.IsWordMail And ActiveInspector.EditorType = olEditorWord Then 'If TypeName(ActiveWindow) = "Inspector" Then 'Insert into Outlook message ObjImage.SaveFile strPath ' save into temporary file StrPath = SpecFolder(&H1C) & "\Temp\TempScan.jpg" ' set temporary file location Set objImage = objCommonDialog.ShowAcquireImage Set objCommonDialog = New WIA.CommonDialog 'Requires a reference to Microsoft Windows Image Acquisition Object Library LngFolderFound = SHGetPathFromIDList(lngPidl, strPath) LngPidlFound = SHGetSpecialFolderLocation(0, lngFolder, lngPidl) Public Function TempFolder(ByVal lngFolder As Long) As String
Public Const CSIDL_LOCAL_APPDATA = &H1C '\Local Settings\Application Data Public Declare Sub CoTaskMemFree Lib "ole32" (ByVal pvoid As Long) (ByVal pidl As Long, ByVal pszPath As String) As Long Lib "shell32" Alias "SHGetPathFromIDListA" _ Public Declare Function SHGetPathFromIDList _
Public Declare Function SHGetSpecialFolderLocation _īyVal nFolder As Long, ppidl As Long) As Long If Dir(ThisWorkbook.Path & "\MyImage.jpg") "" Then 'Between asterisk lines is because Save errors if file exists
Transfer(wiaFormatJPEG) 'Change file type in save to match format Properties("6152").Value = 1167 'vertical extent DPI x inches tall Properties("6151").Value = 830 'horizontal exent DPI x inches wide (Not 100% accurate because real A4 Ht errors) Properties("6150").Value = 0 'y-point where to start scan Properties("6149").Value = 0 'x point where to start scan Properties("6148").Value = 100 'dots per inch/vertical Properties("6147").Value = 100 'dots per inch/horizontal Properties("6146").Value = 4 '4 is Black-white,gray is 2, color 1 (Color Intent) Set wiaScanner = wiaDialog.ShowSelectDevice Line and also in the test if file exists and the Kill statement.) line) and don't forget to change the file extension in the save The following are constants for all of the available formats. When running the code, select the scanner from the displayed dialog box. (Ensure you check the box not just highlight the line.) This reference is only set for the particular workbook not all workbooks.Ĭode has been tested in Windows Vista xl2007 with a Canon 5600F scanner but it should work with most modern scanners. Ver n.n (where n.n is the version number) and check the box.
#Long path tool 4shared code#
However, you will need one of the applications available out there in cyberspace to convert the image to pdfįormat because this code only creates BMP, PNG, GIF, JPEG and TIFF formats.īefore using the code, in the VBA editor select the Menu item Tools -> References and scroll down to Microsoft Windows Image Acquisition Library