hi
I use a macro that attaches a document automatically to an e-mail address ready to send this report is governed by a query of which the criteria is " loss order number "
this is in a pdf format of which I need if possible
the problem I have is the same pdf file keeps attaching itself to the e-mail no matter which loss order number I select .
the reason I think is because the report is called NCR so it is not changing from the previous one
what I think can solve it but not sure and don't know how to do is get the " loss order number " within the report name
if I just send the report to a file direct it does work as I am prompted for a file name
can the loss order number get into the file name within a macro/vba
thanks
steve
I can send a copy of the database if needed
I use a macro that attaches a document automatically to an e-mail address ready to send this report is governed by a query of which the criteria is " loss order number "
this is in a pdf format of which I need if possible
the problem I have is the same pdf file keeps attaching itself to the e-mail no matter which loss order number I select .
the reason I think is because the report is called NCR so it is not changing from the previous one
what I think can solve it but not sure and don't know how to do is get the " loss order number " within the report name
if I just send the report to a file direct it does work as I am prompted for a file name
can the loss order number get into the file name within a macro/vba
thanks
steve
I can send a copy of the database if needed
Code:
Name="EMailDatabaseObject
Name="ObjectType">Report
Name="ObjectName">SEND NCR
Name="OutputFormat">PDF Format (*.pdf
Name="To">=[E-mail Address] & IIf(Nz([E-mail Address