Results 1 to 7 of 7
  1. #1
    angie is offline Competent Performer
    Windows 8 Access 2013
    Join Date
    Dec 2013
    Posts
    232

    hyperlink to scan into folder

    I use the following code to open a hyperlink to a folder foreach customer in our database.
    This folder is where items are scanned into for eachcustomer using scanSnap ix500 using there software to do the scanning. I would like to create another button to scaninto each folder while in the customer record. And if there is no folder itwould create the folder and continue scanning into the created folder.
    Not sure if this can be done but just thought I would ask.


    “click a button that would scan into a folder using thehyperlink and if no folder create one” without using the software that camewith the scanner.

    Private Sub Customer_Doc_Button_Click()
    FollowHyperlink ("\\office\users\officeoffice\documents\custome rs files" & Me.CustomerID)
    End Sub

  2. #2
    June7's Avatar
    June7 is online now VIP
    Windows 10 Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,926
    Use Dir() function to check if folder or file exists. Use MkDir() to create folder.

    If Dir("file or folder path here") = "" Then

    However, I don't understand how you can do scan without the scanner.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  3. #3
    rpeare is offline VIP
    Windows XP Access 2003
    Join Date
    Jul 2011
    Posts
    5,442
    I think you'll need to insert another \ mark in there too

    i.e.

    FollowHyperlink ("\\office\users\officeoffice\documents\customersf iles" & Me.CustomerID)

    unless your folder is actually named customersfiles10001 for example instead of customerfiles\10001\

    I think the followhyperlink would just open a file dialog window though, as june said you'd have to force the creation of the folder with with mkdir or using filesystemobject commands.

  4. #4
    June7's Avatar
    June7 is online now VIP
    Windows 10 Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,926
    I'm betting OP had ...customers files\ and forum post dropped the \.

    To check for a folder (a \ at end not needed but would not hurt):

    Dir("C:\Users\June\Forums", vbDirectory)

    A file is default parameter but can be explicit:

    Dir("C:\Users\June\Forums\*.pdf", vbNormal)
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  5. #5
    angie is offline Competent Performer
    Windows 8 Access 2013
    Join Date
    Dec 2013
    Posts
    232
    I am sorry but I have never used the Dir() or the MkDir() before not sure where I should put it in the above that I used.

  6. #6
    June7's Avatar
    June7 is online now VIP
    Windows 10 Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,926
    You put it in the button code before the FollowHyperlink line. Use a variable.
    Code:
    strPath = \\office\users\officeoffice\documents\customers files\" & Me.CustomerID
    If Dir(strPath, vbDirectory) = "" Then MkDir(strPath)
    FollowHyperlink(strPath)
    NOTE: Cannot get forum to not treat the path as a hyperlink because of space in "customers files", just ignore the highlight/underscore. Advise not to use spaces in any naming convention. Is "office" actually doubled in the path?
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  7. #7
    angie is offline Competent Performer
    Windows 8 Access 2013
    Join Date
    Dec 2013
    Posts
    232
    Thank you June7, it works great. now if I can find a way to scan directly into the folders.

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Scan Into Folder
    By angie in forum Programming
    Replies: 1
    Last Post: 01-12-2016, 01:45 PM
  2. button to scan a document to pdf and save to folder
    By charlieb in forum Programming
    Replies: 2
    Last Post: 04-20-2015, 09:40 AM
  3. Scan File to folder location from access
    By wrbuchanan2 in forum Access
    Replies: 3
    Last Post: 04-26-2013, 10:26 PM
  4. Access 2010 and HyperLink to Folder
    By grapin in forum Programming
    Replies: 4
    Last Post: 04-13-2012, 01:07 PM
  5. Replies: 9
    Last Post: 10-13-2011, 01:30 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums