SendObject question for Arvin Meyer or any other fine contributors

N

Nick X

Hi all,

I have an Excel spreadsheet that comes in via e-mail that is created from a
query at the other end using the SendObject (two different entities, no
network connection). When I download the file it goes into "My Documents"
and overwrites the old file. For convenience I have it linked into the
database on my PC, but linking it causes some of the date fields to show up
as !NUM#. This is not happening in all of the date fields, only two. When I
look at the spreadsheet nothing seems out of the ordinary. When I do an
import of the file the data in these date fields completely disappear. Also,
when I run and Append query I am getting a "Validation Rule" error for all
records, which shouldn't happen because the source table from the satelite Db
is a copy of the destination table.

Seems like this should be relatively straight forward, but it's not...

I changed acFormatXLS to acFormatTXT thinking that it would be easier to
import a comma delimited text file. But there seems to be no way to format
my text file in the SendObject.

Dim strDocName As String
Dim strEmail As String
Dim strMailSubject As String
Dim strEmailBcc As String

strDocName = "Utility_Cuts"
strEmail = "(e-mail address removed)"
strMailSubject = "Utility Quarterly Right-of-Way Cuts"
strEmailBcc = "(e-mail address removed)"

DoCmd.SendObject acSendQuery, ObjectName:=strDocName,
outputformat:=acFormatTXT, To:=strEmail, Bcc:=strEmailBcc,
Subject:=strMailSubject


Is there anyway to format the TXT file so that it is comma delimited instead
of fixed width? Or, is there anyway to format an XLS file?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top