From: Dion on
From Excel, I have some code that opens/exports an Access report to an rtf
file. From here, I create an instance of Word to view/print the file (this
allows me to free up the instance of Access and any locks to the file). As
we all know, rtf loses much of the formating. I can use the same code to
export to a snp file, but I can't figure out how to create an instance of
snapshot viewer to open the file. I have spent about 2 days trying
everything I could find, along with the utilities from Steven Lebans.
Although I can see the answer is probably within these utilities, these are
way way above my level of comprehension. Also, I'm not sure what using
snapview.ocx means (another suggestion I found) - my knowledge of VB is
limited to VBA.

I am ready to forget about the lines, but thought I would try one more time.
So my question is:
How can I open a Snapshot Viewer file from code?
Or,
How can I take an existing Access report and export it (with lines to be
opened in Word) using Steven's code?

thanks much
Dion



From: David Lloyd on
Dion:

If you assume that the Snapshot viewer is installed on the computer, there
should be a mapping in Windows Explorer for .snp files to the Snapshot
Viewer. If you can make this assumption, then you can use the OutputTo
method to export a report in .snp format and use the AutoStart parameter to
start the Snapshot viewer. For example:

DoCmd.OutputTo acOutputReport, "Employees", acFormatSNP,
"C:\TestReport.snp", True

--
David Lloyd
MCSD .NET
http://LemingtonConsulting.com

This response is supplied "as is" without any representations or warranties.


"Dion" <Dion(a)discussions.microsoft.com> wrote in message
news:3ACA4938-D82C-45B7-A25F-52D339A8745C(a)microsoft.com...
From Excel, I have some code that opens/exports an Access report to an rtf
file. From here, I create an instance of Word to view/print the file (this
allows me to free up the instance of Access and any locks to the file). As
we all know, rtf loses much of the formating. I can use the same code to
export to a snp file, but I can't figure out how to create an instance of
snapshot viewer to open the file. I have spent about 2 days trying
everything I could find, along with the utilities from Steven Lebans.
Although I can see the answer is probably within these utilities, these are
way way above my level of comprehension. Also, I'm not sure what using
snapview.ocx means (another suggestion I found) - my knowledge of VB is
limited to VBA.

I am ready to forget about the lines, but thought I would try one more time.
So my question is:
How can I open a Snapshot Viewer file from code?
Or,
How can I take an existing Access report and export it (with lines to be
opened in Word) using Steven's code?

thanks much
Dion




From: Stephen Lebans on
Dion I still am not sure exactly what you are trying to accomplish.

First, there is no method to export an Access report to a format that MS
Word can open and fully edit. The closest you can come is the native support
for RTF, but as you mentioned, the Access to RTF export functions are TEXT
only..


If you must have an exact copy of your report and simply want to VIEW the
report within an MS Word document, then you can use the ReportUtilities code
on my site.

If you simply want to open an existing Snapshot file then there are two
methods available.

1) Place the Snapshot ActiveX control on an Access form. Sample code showing
you how to programmatically load a Snapshot file into the control can be
found within the ReportUtilities MDB.

2) If you just want to be able to open, view and Print a Snapshot file
outside of Access then you can use the Microsoft Snapshot Viewer app. It is
automatically registered to handle the SNP( Snapshot) file format. To test
this, double click on any SNapshot file on your system.

--

HTH
Stephen Lebans
http://www.lebans.com
Access Code, Tips and Tricks
Please respond only to the newsgroups so everyone can benefit.


"Dion" <Dion(a)discussions.microsoft.com> wrote in message
news:3ACA4938-D82C-45B7-A25F-52D339A8745C(a)microsoft.com...
> From Excel, I have some code that opens/exports an Access report to an rtf
> file. From here, I create an instance of Word to view/print the file
> (this
> allows me to free up the instance of Access and any locks to the file).
> As
> we all know, rtf loses much of the formating. I can use the same code to
> export to a snp file, but I can't figure out how to create an instance of
> snapshot viewer to open the file. I have spent about 2 days trying
> everything I could find, along with the utilities from Steven Lebans.
> Although I can see the answer is probably within these utilities, these
> are
> way way above my level of comprehension. Also, I'm not sure what using
> snapview.ocx means (another suggestion I found) - my knowledge of VB is
> limited to VBA.
>
> I am ready to forget about the lines, but thought I would try one more
> time.
> So my question is:
> How can I open a Snapshot Viewer file from code?
> Or,
> How can I take an existing Access report and export it (with lines to be
> opened in Word) using Steven's code?
>
> thanks much
> Dion
>
>
>


From: Dion on
Stephen-
Thanks - I simply want to view the report, so my answer is in your second
point. I found I only needed to add the AutoStart parameter to the OutputTo
method. After 2 days of looking for a solution, adding ",True" to my
existing code was so simple I almost wept.

Prior to this, I did download two of your zip files - A2K2ReportUtilities,
and ReportUtilities. Although these are way above my level of understanding
(I'm self taught), I'm interested in knowing how they work. If I have an
existing Access file, how can I export a report using your utilities? - I
know how to create a reference to the mde file, but there seems to be much
more I would need to do.

Thanks much for your help!
Dion

From: Stephen Lebans on
You just have to look at the source code behind the sample Form to see how
to call the ReportUtilities. If you need step by step instructions, search
on GoogleGroups for my name and ReportUtilities and I'm positive you will
find the necessary info.

--

HTH
Stephen Lebans
http://www.lebans.com
Access Code, Tips and Tricks
Please respond only to the newsgroups so everyone can benefit.


"Dion" <Dion(a)discussions.microsoft.com> wrote in message
news:E74B51C1-245B-45DE-8F7C-E4832DFDA9EC(a)microsoft.com...
> Stephen-
> Thanks - I simply want to view the report, so my answer is in your second
> point. I found I only needed to add the AutoStart parameter to the
> OutputTo
> method. After 2 days of looking for a solution, adding ",True" to my
> existing code was so simple I almost wept.
>
> Prior to this, I did download two of your zip files - A2K2ReportUtilities,
> and ReportUtilities. Although these are way above my level of
> understanding
> (I'm self taught), I'm interested in knowing how they work. If I have an
> existing Access file, how can I export a report using your utilities? - I
> know how to create a reference to the mde file, but there seems to be much
> more I would need to do.
>
> Thanks much for your help!
> Dion
>


 | 
Pages: 1
Next: Form Data to Report Data