+ Reply to Thread
Results 1 to 2 of 2

sending email with the url, required all files path from a particular folder

  1. #1
    Forum Contributor
    Join Date
    10-30-2019
    Location
    Agra
    MS-Off Ver
    Office 2010
    Posts
    241

    sending email with the url, required all files path from a particular folder

    Hi,

    we are using the attached excel file for sending the some mails with attachment.

    1. Our problem is we want to get the all file details in column E from a specific folder
    For Example in a folder we have three files so all three files path in column H
    C:\Users\new\Desktop\New folder\Report-2.xlsx
    C:\Users\new\Desktop\New folder\Report-2.pdf
    C:\Users\new\Desktop\New folder\Report-2.zip
    Attached Files Attached Files

  2. #2
    Forum Contributor
    Join Date
    10-30-2019
    Location
    Agra
    MS-Off Ver
    Office 2010
    Posts
    241

    Re: sending email with the url, required all files path from a particular folder

    got the solution

    Sub FileDetails()
    Dim objFSO As Object
    Dim objFolder As Object
    Dim objFile As Object
    Dim i As Integer

    'Create an instance of the FileSystemObject
    Set objFSO = CreateObject("Scripting.FileSystemObject")
    'Get the folder object
    Set objFolder = objFSO.GetFolder("C:\Users\Me\Desktop\Temp(5)")
    i = 1
    'loops through each file in the directory and prints their names and path
    For Each objFile In objFolder.Files
    'print file name
    Cells(i + 1, 5) = objFile.Name
    'print file path
    Cells(i + 1, 5) = objFile.Path
    i = i + 1
    Next objFile
    End Sub

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. move files from Source Folder to Destination Folder, based on file name & Path
    By seenai in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 07-31-2020, 09:29 AM
  2. [SOLVED] sending network path in HTML email via VBA in Lotus Notes
    By BellyGas in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 02-08-2017, 08:57 AM
  3. Sending Individual Worksheet via Email (Outlook) with Required Cells
    By JCRoessler14 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 08-24-2016, 01:40 PM
  4. help required in sending email to group mail Ids/ Multiple reciepents.
    By vedamoorthy22 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 11-26-2015, 04:02 AM
  5. [SOLVED] Copy files from one folder to another folder (path in textbox)
    By yoko21 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 06-24-2014, 02:45 AM
  6. Replies: 0
    Last Post: 08-06-2012, 02:21 PM
  7. Sending Email Via The Draft Folder
    By The_Snook in forum Outlook Formatting & Functions
    Replies: 1
    Last Post: 09-22-2010, 04:05 PM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1