Export from Macro in PDF Format

jcbhydro

Registered User.
Local time
Today, 07:19
Joined
Jul 26, 2013
Messages
187
Good Afternoon,

I have constructed a Macro which works fine to export a long series of files from database tables for circulation to some 50 recipients.
The Macro incorporates the expression Export with formatting and output format has been selected as 'PDF format (*.pdf).
The macro produces the multiple files in sequence as required, but the files are not true pdf files. The properties page for the files describes File Type as 'file'.

On attempting to open the file, one is requested to choose a program to use. If one selects Adobe the file opens as if it were a pdf file, but one has to do a 'save as' specifying PDF to achieve true pdf status and pdf file extension.

I need to transmit the files to recipients as email attachments and I can't expect recipients to go through the 2 stage process I have described above.
Yesterday I spent an hour to go through this process for 52 output files.

Access shouldn't describe the procedure as a pdf export if it does not produce a true pdf file.

Any suggestion to solve this strange anomaly would be gratefully received.

Regards,

jcbhydro
 
Hmm, when I use Outputto I get a .PDF file, so perhaps there is something in your Macro that is causing this. Can you post the steps here for us to have a look?
 
Good Morning,

When I copy and pasre the 'Export with Formatting' section of the Macro, this is what results. This bears little resemblance to the code shown in the Macro itsef. Is the cut and paste procedure the correct one to produce what you want to examine?

<?xml version="1.0" encoding="UTF-16" standalone="no"?>
<UserInterfaceMacros xmlns="http://schemas.microsoft.com/office/accessservices/2009/11/application"><UserInterfaceMacro MinimumClientDesignVersion="14.0.0000.0000"><Statements><Action Name="ExportWithFormatting"><Argument Name="ObjectType">Report</Argument><Argument Name="ObjectName">Groups Membership Report</Argument><Argument Name="OutputFormat">PDFFormat(*.pdf)</Argument><Argument Name="OutputFile">GrMemA1</Argument></Action></Statements></UserInterfaceMacro></UserInterfaceMacros>

I did notice that one term in the Export procedure is 'Auto Start On' ( options Yes/No). No is selected. Is this the problem, should this be 'yes'?

jcbhydro
 
Is this a Macro or an Embedded Macro? Is this a Web Database? What exactly did you copy?
 
Gina,

The Macro was created as part of the database using the 'create macro' facility from the toolbar. Does this make it an Embedded Macro? It is not a Web Database.
As explaaned I did a simple copy and paste off the 'Export with Formatting' section of one of a series of some 25 identical procedures, which differ only in the file names being processed.

jcbhydro
 
Hmm, must be because of the version. What version are you using?
 
You've probably mistakenly ended the file name as ".file" in the macro.

Let's see a screenshot of the macro.
 
Hmm, then please do as vbaInet suggested because when I try to use it it is not being recognized and usually you just copy and paste to see the actual macro.
 
Problem solved!

Not a mistaken entry, but a very ambiguous coding instruction.

The Export with formatting routine has a line which reads;
Output Format for which I selected 'PDF Format (*.pdf)
The next line requires input of the path and filename, for which I input a series of filenames such as MemGrA1, etc.
Apparently it is also necessary to add the file extension again at this point.
Having selected that extension in the line above I naturally assumed that it would be automatically added to the filename.

I'm grateful for your suggestions and regret bothering you, but you must agree that it is a surprising requirement.

jcbhydro
 
Actually, no not surprising. You have to do the same thing if you use code. Glad you worked it out!
 

Users who are viewing this thread

Back
Top Bottom