Steve-vfp9user
Programmer
Hello all
Part of an app I am currently putting together involves emailing jobs to users who then import that job into another app I have produced.
The current system works like this:
[ul]
[li]I select the job to be emailed[/li]
[li]The relevant coding zips a .dbf and an .fpt file to a zipped file (The record contains several memo fields hence the .fpt file)[/li]
[li]The zipped file is emailed to the user (all the above is working perfectly)[/li]
[li]The user will then run their app which unzips the zipped folder, imports the record contained in the zipped file and is updated by the user[/li]
[/ul]
I’ve not yet got as far as unzipping the zipped folder on the Windows tablet (albeit I have tested an un associated small app with VFP9 to ensure it works), import the record contained in the zipped file and allow the user to update and return the record by email yet as so far this process appears to be somewhat cumbersome.
The code to zip the file was produced by craigsboyd (Sweet Potato) and works as it should (Of course).
My question is: What is the best way to export or send relevant records from a dbf table to a user via email for them to pick up, update and send it back?
It’s only the best way to automate I need advice on, I’m doing ok with the coding so far and here is the code for zipping the file with credit as above:
Here is part of the code I use to send the email (edited):
I’m using VFP9 SP2, Windows 10 on my desktop and 7 on the Windows tablet
Thank you
Steve
Part of an app I am currently putting together involves emailing jobs to users who then import that job into another app I have produced.
The current system works like this:
[ul]
[li]I select the job to be emailed[/li]
[li]The relevant coding zips a .dbf and an .fpt file to a zipped file (The record contains several memo fields hence the .fpt file)[/li]
[li]The zipped file is emailed to the user (all the above is working perfectly)[/li]
[li]The user will then run their app which unzips the zipped folder, imports the record contained in the zipped file and is updated by the user[/li]
[/ul]
I’ve not yet got as far as unzipping the zipped folder on the Windows tablet (albeit I have tested an un associated small app with VFP9 to ensure it works), import the record contained in the zipped file and allow the user to update and return the record by email yet as so far this process appears to be somewhat cumbersome.
The code to zip the file was produced by craigsboyd (Sweet Potato) and works as it should (Of course).
My question is: What is the best way to export or send relevant records from a dbf table to a user via email for them to pick up, update and send it back?
It’s only the best way to automate I need advice on, I’m doing ok with the coding so far and here is the code for zipping the file with credit as above:
Code:
mcurr=SYS(5)+SYS(2003)
SET LIBRARY TO LOCFILE("vfpcompression.fll")
?ZipFolderQuick(mcurr+"\exportopjob\exportopjob")
?ZipFolderQuick(mcurr, .T., "MyPassword")
?ZipFolderQuick(mcurr, .F., "MyPassword")
SET LIBRARY TO
Here is part of the code I use to send the email (edited):
Code:
oOutlook = Createobject('Outlook.Application')
oNameSpace = oOutlook.getnamespace('MAPI')
oOutbox = oNameSpace.GetDefaultFolder(4)
oItems = oOutbox.Items
oMailItem = oItems.Add(0)
oMailItem.To = ALLTRIM(recipient)
oMailItem.Subject = TRIM(subject)
oMailItem.Body = TRIM(themessage)
oMailItem.attachments.add(thefile)
oMailItem.ReadReceiptRequested = .T.
oMailItem.Send
I’m using VFP9 SP2, Windows 10 on my desktop and 7 on the Windows tablet
Thank you
Steve