one more Lebans Question....stop Adobe from oepning?

  • Thread starter rfuscjr via AccessMonster.com
  • Start date
R

rfuscjr via AccessMonster.com

I am 99% there! I have some code that loops thru a table of ids creating an
Accesss report for each and now converting them to pdf files and writing that
file to our share...YEA!

I notice that Adobe opens and in addition to my files being written to the
share. I end up with each report open in Adobe...I guess this is part of the
lebans function.

Is there a way to stop adobe from opening...or at least to get it to close
after each conversion? I have no need to see the reports in front of me...
just need them written to the share.

Thanks again!
 
D

Dirk Goldgar

rfuscjr via AccessMonster.com said:
I am 99% there! I have some code that loops thru a table of ids creating
an
Accesss report for each and now converting them to pdf files and writing
that
file to our share...YEA!

I notice that Adobe opens and in addition to my files being written to the
share. I end up with each report open in Adobe...I guess this is part of
the
lebans function.

Is there a way to stop adobe from opening...or at least to get it to close
after each conversion? I have no need to see the reports in front of
me...
just need them written to the share.

Thanks again!


If you read the function documentation, you'll see there's an optional
StartPDFViewer argument that defaults to True. If you pass False for that
argument, it won't do that.
 
R

rfuscjr via AccessMonster.com

In all my excitement I missed that Thanks!

Dirk said:
I am 99% there! I have some code that loops thru a table of ids creating
an
[quoted text clipped - 13 lines]
Thanks again!

If you read the function documentation, you'll see there's an optional
StartPDFViewer argument that defaults to True. If you pass False for that
argument, it won't do that.
 
R

rfuscjr via AccessMonster.com

Still not working, I am not very technical so maybe I am missing the boat but.
..

I found this line of code in this module: modReportToPDF and changed *true*
to *false* as follows:

Optional StartPDFViewer As Boolean = False, _

I also found a reference where the If and Endif were commented out I removed
the comments:

' Do we open new PDF in registered PDF viewer on this system?
If StartPDFViewer = True Then
ShellExecuteA Application.hWndAccessApp, "open", sPDF, vbNullString,
vbNullString, 1
End If


IT STILL OPENS ADOBE, once for each report. Perhaps there is an area I am
missing?

In all my excitement I missed that Thanks!
[quoted text clipped - 5 lines]
StartPDFViewer argument that defaults to True. If you pass False for that
argument, it won't do that.
 
D

Dirk Goldgar

rfuscjr via AccessMonster.com said:
Still not working, I am not very technical so maybe I am missing the boat
but.
.

I found this line of code in this module: modReportToPDF and changed
*true*
to *false* as follows:

Optional StartPDFViewer As Boolean = False, _

I also found a reference where the If and Endif were commented out I
removed
the comments:

' Do we open new PDF in registered PDF viewer on this system?
If StartPDFViewer = True Then
ShellExecuteA Application.hWndAccessApp, "open", sPDF, vbNullString,
vbNullString, 1
End If


IT STILL OPENS ADOBE, once for each report. Perhaps there is an area I am
missing?

I'm not sure what you did, but you shouldn't have done it. Don't change the
code, change the call to the function! Somewhere in *your* code, you are
calling the function ConvertReportToPDF. Please post that line of code.
 
R

rfuscjr via AccessMonster.com

ok, I think I see...this is an attribute of the function call...I was
thinking it was a generic setting...so I need to change:
blRet = ConvertReportToPDF("RptMaster", vbNullString, _
RptName & ".pdf", False, True, 150, "", "", 0, 0, 0) this to false....
one of the parameters....
Dirk said:
Still not working, I am not very technical so maybe I am missing the boat
but.
[quoted text clipped - 18 lines]
IT STILL OPENS ADOBE, once for each report. Perhaps there is an area I am
missing?

I'm not sure what you did, but you shouldn't have done it. Don't change the
code, change the call to the function! Somewhere in *your* code, you are
calling the function ConvertReportToPDF. Please post that line of code.
 
D

Dirk Goldgar

rfuscjr via AccessMonster.com said:
ok, I think I see...this is an attribute of the function call...I was
thinking it was a generic setting...so I need to change:
blRet = ConvertReportToPDF("RptMaster", vbNullString, _
RptName & ".pdf", False, True, 150, "", "", 0, 0, 0) this to
false....
one of the parameters....


The default value of the optional argument, StartPDFViewer, is defined as
True in the function definition, but you have control of what the actual
value of the argument is when you call the function. In your quoted line of
code:
blRet = ConvertReportToPDF("RptMaster", vbNullString, _
RptName & ".pdf", False, True, 150, "", "", 0, 0, 0)

.... I think it's the fifth argument, so you should change that line to:

blRet = ConvertReportToPDF("RptMaster", vbNullString, _
RptName & ".pdf", False, False, 150, "", "", 0, 0, 0)
 
R

rfuscjr via AccessMonster.com

seems to work now...Thanks!
Dirk said:
The default value of the optional argument, StartPDFViewer, is defined as
True in the function definition, but you have control of what the actual
value of the argument is when you call the function. In your quoted line of
code:


... I think it's the fifth argument, so you should change that line to:

blRet = ConvertReportToPDF("RptMaster", vbNullString, _
RptName & ".pdf", False, False, 150, "", "", 0, 0, 0)
 
Top