Hi,
I've been using the code below recently to mail customers using data from my tables. All has been well. However - I would like to use the same/similar code to send a particular file from a remote machine to my office.
Is there a simple one-line command (e.g. thismailitem.attachment = \\ccccc\ccc.dbf) that can be added to this code?
I'm aware of the VFP MAPI classes/wrappers, but - if such a thing exists - I'm
after a quick fix.
**************************
strProfile = "profile"
strPassword = "profile"
strRecipient = "
anybody@domain.co.uk"
strSubject = "customer.dbf" + dtoc(date())+" "+ time()
strBody = "Hello you. Please find file attached."
theApp = CreateObject("Outlook.Application")
theNameSpace = theApp.GetNameSpace("MAPI")
theNameSpace.Logon(strProfile , strPassword)
theMailItem = theApp.CreateItem(0)
theMailItem.Recipients.Add( strRecipient )
theMailItem.Subject = strSubject
theMailItem.Body = strBody
theMailItem.Send
theNameSpace.Logoff