Results 1 to 11 of 11
  1. #1
    Kencao is offline Novice
    Windows Vista Access 2007
    Join Date
    Jan 2010
    Posts
    12

    3rd party file attachment control

    I am trying to find a 3rd party component that can be used in an Access form to copy and open file attachment (Word or Excel). If you have any suggestions, please let me know.

    Thank you very much in advance.

    Ken



    Application info:
    Data entry form
    Access 2007 - front-end
    SQL Server 2005 - back-end

  2. #2
    pkstormy's Avatar
    pkstormy is offline Access/SQL Server Expert
    Windows XP Access 2003
    Join Date
    Mar 2010
    Location
    Madison
    Posts
    682
    Not sure about the copy coding but to open a word or excel document, I use the following:

    Dim strURL as variant
    strURL = "C:\MyFolder\MyDocument.Doc"
    application.followhyperlink strURL

  3. #3
    Kencao is offline Novice
    Windows Vista Access 2007
    Join Date
    Jan 2010
    Posts
    12
    Thanks for the reply. But the file attachment has to be stored inside the database.

  4. #4
    pkstormy's Avatar
    pkstormy is offline Access/SQL Server Expert
    Windows XP Access 2003
    Join Date
    Mar 2010
    Location
    Madison
    Posts
    682
    I'm misunderstanding what you mean by copy and open a file attachment? Can you explain a little more? Do you mean copy a word/excel file itself from within vba? or do you mean copy/paste a record within a table?

  5. #5
    pkstormy's Avatar
    pkstormy is offline Access/SQL Server Expert
    Windows XP Access 2003
    Join Date
    Mar 2010
    Location
    Madison
    Posts
    682
    If to copy a file itself from within vba:

    OldName = "C:\SomeExample.doc"
    NewName = "C:\NewExample.doc"
    retval = 0
    Dim objFSO As Object
    Set objFSO = CreateObject("Scripting.FileSystemObject")
    retval = objFSO.CopyFile(OldName, NewName, True)
    Set objFSO = Nothing

  6. #6
    Kencao is offline Novice
    Windows Vista Access 2007
    Join Date
    Jan 2010
    Posts
    12
    Sorry, I wasn't clear.

    I meant to say copy/paste a file to a record within a sql table. Hopefully no coding needed.

    Someone told me about a 3rd party image control that works beautifully. It's called DBPix and was created by Ammara.com. I am looking for something like it.

  7. #7
    Kencao is offline Novice
    Windows Vista Access 2007
    Join Date
    Jan 2010
    Posts
    12
    If anyone knows of a 3rd party file attachment control to suggest, please help!

  8. #8
    ajetrumpet is offline VIP
    Windows Vista Access 2007
    Join Date
    Mar 2010
    Location
    N/A
    Posts
    2,694
    it's been 3 weeks since your last post. Haven't found what you're looking for?

    From what I understand of this thread, what you want is something that can take a file that has been received in an email and copy that into one of your records in the access database. correct?

    If that is so and your email client is anything other than MS Outlook, I would say you're out of luck using Visual Basic "anything". It depends entirely on whether or not VBA has the appropriate libraries. I think we were all surprised when the Firefox library was included. Never thought I'd see the day! However, VBA can manipulate file attachments in Outlook sessions and of course VBA can work in any of the primary office programs. Now, whether it's possible to use that integration ability to copy an attachment object from Outlook over to Access field remains to be seen.

    I can tell you that everything I mentioned above is fairly easy EXCEPT moving the attachment between the programs. I'm guessing the code would look something like:
    Code:
    [OUTLOOK SYNTAX].attachment.copy
    that's a possibly, but I doubt it would work. I'm not really sure if Access needs a local path for the attachment field, or if it actually holds that object in the table itself. I'm guessing the latter.

    It's also entirely possible that you would have to use VBA to mirror the exact interface process you have to go through to do the same thing (e.g. - save it locally, then updates Access's recordset with the file path).

    This method will take some research effort, but I'm almost 100% sure it is possible. MS programs act exactly like windows with regards to the "interface vs. shell" concept. In most of them, clicking is just like running commands from the shell. In windows, clicking on a folder is just a command to the system. Before MS had a windows interface, Bill Gates was doing the same thing with a single command line. He was simply smart enough to assign mouse clicking to those command and make it look pretty...

  9. #9
    Kencao is offline Novice
    Windows Vista Access 2007
    Join Date
    Jan 2010
    Posts
    12
    No luck with the 3rd party control yet. I don't think your suggestion will work.

    Per our client, data needs to be migratable to an Oracle database. I don't think the Access attachment data type can be converted to an Oracle data type. So I think Access as a backend is not an option. So I used SQL Server 2005 instead.

    I have a deadline looming. I prefer to purchase a control that I can attach to an Access form quickly. From the possible 3rd party control in an Access form, I want to be able to copy and save a file to a sql table and be able to retrieve the file from a sql table later. I hope there is such a component out there somewhere. I don't know if it is possible to create or program this component in Access.

  10. #10
    ajetrumpet is offline VIP
    Windows Vista Access 2007
    Join Date
    Mar 2010
    Location
    N/A
    Posts
    2,694
    Your client?

    The forum is here to assist users, not contractors. Sorry.

  11. #11
    Kencao is offline Novice
    Windows Vista Access 2007
    Join Date
    Jan 2010
    Posts
    12
    Pardon my ignorance. I am unaware of this policy. Is this forum for students only? Work related questions shouldn't be posted here?

    Anyhow, I am not a contractor. I work for a real estate company. I am creating a one-time application for their one client.

    Thanks for your suggestions earlier. Best regards.

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

Similar Threads

  1. How would you output an XML file with an Ole Attachment?
    By techneophyte in forum Programming
    Replies: 7
    Last Post: 09-09-2010, 09:09 AM
  2. How do you file save an 'Attachment' content through code?
    By morespamforya in forum Programming
    Replies: 3
    Last Post: 08-06-2010, 08:58 AM
  3. Third-Party Treeview Control?
    By RobHurwitz in forum Programming
    Replies: 1
    Last Post: 05-24-2010, 05:52 PM
  4. Third Party TreeView Control?
    By RobHurwitz in forum Access
    Replies: 1
    Last Post: 05-24-2010, 05:52 PM
  5. How To View Hyperlink For Attachment File
    By treyprice in forum Access
    Replies: 0
    Last Post: 07-28-2009, 12:51 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