8 Replies Latest reply on Nov 24, 2012 8:42 AM by philmodjunk

    Import Files From Server

    jb_1

      Title

      Import Files From Server

      Post

           Hi;

           I create an excel macro thet running in the server ; after exporting excel files in server, Running the macro ,  we will get a word Documents ( .Doc files) that contain Data Copied from EXCEL files exported.

            I want to import this documents (file.doc) from Server to my DB then send them with e-mails.!!

           Please how can I IMPORT this Documents to the FM DB ?? Where Can I save Them in my DB?? A csript or a solutions pleaase to do that before send them with attaching files?? Thanks

        • 1. Re: Import Files From Server
          philmodjunk

               The only place you can "save" a file inside FileMaker is to insert it into a container field. You can also, however, save the file path to the file in a text field if the reason you need to save the file is so that a script can attach it to an email.

          • 2. Re: Import Files From Server
            jb_1

                 Hi Phil ;

             "save  a file inside FileMaker is to insert it into a container field"!! 

            I can't use the fonction " insert file " I work with the IWP !! Is That possible for other way ?? 

            • 3. Re: Import Files From Server
              philmodjunk

                   I thought that you wanted your server schedule to do this. Haven't checedk to see if that is possible, but server schedules have a different set of limitations than IWP. Please make note of the second option that I also posted--that instead of "saving the file" just store the file's file path in a text field.

              • 4. Re: Import Files From Server
                jb_1

                     Hi Phil ; 

                 save the file path to the file in a varibale " Set Varible " then send mail with attached file ; But I can't do the best . Please can you expalin for me how can I save the file path  in a text field  and  attach it to an email..?? And how ca, I define the Path in the server if the path is : "C:\\DocumentAnd Settings\user\My Documents"??

                      

                      

                      

                • 5. Re: Import Files From Server
                  philmodjunk

                       That's not a valid path for something you want the server to do. That appears to be a path to the client's computer instead of a directory on the server.

                       It's not clear to me whether or not you are successfully attaching the file to an email. Are you able to do that?

                       If so, all that is left is using set field to copy the value of the variable into a text field, to "save" that location.

                  • 6. Re: Import Files From Server
                    jb_1

                          

                         Phil I'll explain in detail what I managed to do is what I must do:
                          
                           I managed to export data file format. "XLS" in the server using a script to schedule and send these files by e-mail.
                          
                         My goals are not to send a file format. "XLS" but sending format. "Doc", I made a excel macro that allows opening an excel file to copy the data, line by line, in a word template and then save the document under a new name (the name of the "2nd" column, row "j" of the excel file).
                          
                         What I should do, is to send these word documents, saved in a folder "ALLUSER" from the server to the user by email.
                    • 7. Re: Import Files From Server
                      jb_1

                      ""If so, all that is left is using set field to copy the value of the variable into a text field, to "save" that location.""

                           I think that what you said is that what I really nedd for my works ; can you , please , explain that point more :) thnks to you Phill

                      • 8. Re: Import Files From Server
                        philmodjunk

                             FileMaker can generate files of type xls, but not of type doc. It CAN export to files of type csv, txt or mer--all of which can be opened with MS Word, but which lack the document formatting of a .DOC file.