Avatar of SteveL13
SteveL13
Flag for United States of America asked on

Trying to send a report in PDF format to an established folder on computer

I am trying to send a report in PDF format to an established folder on computer.  The folder path is

strClientAppealsAttachmentFolderDataPath

which I know is a real path because I debug.print it.

I really don't want to preview the report, just send it to the folder.

Here is my code:

DoCmd.OpenReport "rptBillOfLading", acViewPreview, , , acHidden
DoCmd.OutputTo acOutputReport, "rptBillOfLading", acFormatPDF, strClientAppealsAttachmentFolderDataPath

Open in new window


but I get an The OutputTo action was cancelled and the report preview but I don't want it to.

????
Microsoft Access

Avatar of undefined
Last Comment
SteveL13

8/22/2022 - Mon
bfuchs

Make sure you have full rights to copy things into that folder.
try first using FileCopy method to that location, see what happens.
SteveL13

ASKER
I do have full rights.  And please remember, I don't want to preview the report.  Just copy it to the directory.
ASKER CERTIFIED SOLUTION
Dale Fye

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
SOLUTION
bfuchs

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
⚡ FREE TRIAL OFFER
Try out a week of full access for free.
Find out why thousands trust the EE community with their toughest problems.
SteveL13

ASKER
Got it.  I had to change this:

strClientAppealsAttachmentFolderDataPath

to this:

strClientAppealsAttachmentFolderDataPath & "\rptReportName.PDF"
Experts Exchange is like having an extremely knowledgeable team sitting and waiting for your call. Couldn't do my job half as well as I do without it!
James Murphy