PC Review


Reply
Thread Tools Rate Thread

Print SNP file from code

 
 
=?Utf-8?B?U0hJUFA=?=
Guest
Posts: n/a
 
      16th Mar 2006
Is it possible to print a SNP file from code? If so what is the code. I am
using Access 97.
--
M. Shipp
 
Reply With Quote
 
 
 
 
Alex Dybenko
Guest
Posts: n/a
 
      17th Mar 2006
Try to use ShellExecute with "print" operation argument
http://maug.pointltd.com/access/Quer...il.asp?TipID=5

--
Alex Dybenko (MVP)
http://alexdyb.blogspot.com
http://www.PointLtd.com


"SHIPP" <(E-Mail Removed)> wrote in message
news:EE013FBD-492E-438C-A915-(E-Mail Removed)...
> Is it possible to print a SNP file from code? If so what is the code. I am
> using Access 97.
> --
> M. Shipp


 
Reply With Quote
 
Duncan Bachen
Guest
Posts: n/a
 
      17th Mar 2006
Alex Dybenko wrote:
> Try to use ShellExecute with "print" operation argument
> http://maug.pointltd.com/access/Quer...il.asp?TipID=5
>


Why make this so complicated with using an API? Simply use
DoCmd.OutputTo. It can output a variety of formats, including SNP (You
need at least Access 97 SR-1 to support SNP)

docmd.OutputTo acOutputReport, "rptMyReport", acFormatSNP,
"C:\something.snp"

--
-D
Duncan Bachen
Director of I.T., Ole Hansen and Sons, Inc.
 
Reply With Quote
 
Rick Brandt
Guest
Posts: n/a
 
      17th Mar 2006
Duncan Bachen wrote:
> Alex Dybenko wrote:
>> Try to use ShellExecute with "print" operation argument
>> http://maug.pointltd.com/access/Quer...il.asp?TipID=5
>>

>
> Why make this so complicated with using an API? Simply use
> DoCmd.OutputTo. It can output a variety of formats, including SNP (You
> need at least Access 97 SR-1 to support SNP)
>
> docmd.OutputTo acOutputReport, "rptMyReport", acFormatSNP,
> "C:\something.snp"


That will not "print" an existing SNP file which is I assume what the OP
wants to do. It will create a new one, but it will not print an existing
one.

--
I don't check the Email account attached
to this message. Send instead to...
RBrandt at Hunter dot com


 
Reply With Quote
 
=?Utf-8?B?U0hJUFA=?=
Guest
Posts: n/a
 
      17th Mar 2006
The parameter acformatsnp gives an error. Any other advice?
--
M. Shipp


"Duncan Bachen" wrote:

> Alex Dybenko wrote:
> > Try to use ShellExecute with "print" operation argument
> > http://maug.pointltd.com/access/Quer...il.asp?TipID=5
> >

>
> Why make this so complicated with using an API? Simply use
> DoCmd.OutputTo. It can output a variety of formats, including SNP (You
> need at least Access 97 SR-1 to support SNP)
>
> docmd.OutputTo acOutputReport, "rptMyReport", acFormatSNP,
> "C:\something.snp"
>
> --
> -D
> Duncan Bachen
> Director of I.T., Ole Hansen and Sons, Inc.
>

 
Reply With Quote
 
Rick Brandt
Guest
Posts: n/a
 
      17th Mar 2006
SHIPP wrote:
> The parameter acformatsnp gives an error. Any other advice?


That constant was added in newer versions. If you are using Access 97 use
"Snapshot Format" (including the quotes).

--
I don't check the Email account attached
to this message. Send instead to...
RBrandt at Hunter dot com


 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Copy all code to file or print all code cp2599@yahoo.com Microsoft Access Forms 2 28th Apr 2009 11:04 PM
Print a PDF File in VBA Code Marcio Microsoft Access VBA Modules 2 12th Aug 2008 08:44 AM
VB code to print pdf file Laurie Scott Microsoft VB .NET 1 28th May 2008 01:20 PM
Re: Need a code to print and save file as Ron de Bruin Microsoft Excel Programming 4 9th Jan 2007 09:42 PM
Print a SNP file from code =?Utf-8?B?U0hJUFA=?= Microsoft Access VBA Modules 0 15th Mar 2006 02:31 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 08:05 AM.