[Last Call] Learn about multicloud storage options and how to improve your company's cloud strategy. Register Now

x
?
Solved

how to  achive the link of an open snapshot by vba/access

Posted on 2008-10-05
11
Medium Priority
?
484 Views
Last Modified: 2013-11-28
i need to save by code open access snapshot in cartain location, what dont know is how i get the "object" (the certain open snapshot) so i could use the DoCmd.OutputTo to save it, tank's
gabi adam
0
Comment
Question by:gabi456
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
11 Comments
 
LVL 26

Expert Comment

by:dannywareham
ID: 22644471
By "snapshot" I assume you man an image...

There's a couple of ways of doing this.
Do you need to be able to browse for the file, or do you just want to have it related to a record?

If it's the latter, save a field in your table called "Image_Location"
Then, on your form, create an image holder called "imgSnapshot"  and a text field called "txtImage_LocatioN" which is bounf to the field in the table/query.

Next, in the On_Current event, add this code:

Dim myLocation as String
On Error GoTo ErrTrap

myLocation = me.txtImage_Location
me.imgSnapshot.Picture = myLocation
Exit sub

ErrTrap:
me.imgSnapshot.Picture = Null   '<-- you can change this to show a default image if you wish


If you need to be able to browse for a file, let me know and I'll give you code


0
 
LVL 74

Expert Comment

by:Jeffrey Coachman
ID: 22644766
gabi456,

I am having trouble understanding your question.
Can you try and rephrase it?

First, when you say "Snapshot" do you mean an image, as dannywareham suggests.
Or do you mean a Report in the Snapshot format?

Thanks

JeffCoachman
0
 
LVL 44

Expert Comment

by:GRayL
ID: 22645813
Access doesn't use Snapshot Viewer to view reports.  You can 'Export' a report in snp format to any location.  Once outside of Access, you can doubleclick on that report , say 'Report1.snp' from Windows Explorer and it will open in the Snapshot Viewer - this close??
0
Nothing ever in the clear!

This technical paper will help you implement VMware’s VM encryption as well as implement Veeam encryption which together will achieve the nothing ever in the clear goal. If a bad guy steals VMs, backups or traffic they get nothing.

 

Author Comment

by:gabi456
ID: 22645848
the users get emails with an atachment in the Report Snapshot format, after they open it, i would like to let them save it in a certain location on the office network by code, they get use to do the same with word documents, the vba code get the open word document and then i can do with what ever thay like as save it automaticly in cartain place with cartain name, i am looking for similar solution with .snp files, tank's
gabi adam.
0
 
LVL 26

Expert Comment

by:dannywareham
ID: 22645869
?
I don't think that this is possible.
The snapshot file is just a viewer. It's not like Word, Access or Outlook which have VBA code sat behind them to manipulate.

If you have code in Outlook that can save an attachment to a location, you can change this to a .snp rather than .doc/.docx extension.

Can you give us an example of what you use at the moment?
0
 

Author Comment

by:gabi456
ID: 22646000
Set AppW= GetObject(, "word.application")
If AppW.Documents.Count > 0 Then
   AppW.ActiveDocument.SaveAs filename:=NameIpass, FileFormat:=wdFormatDocument
end if
this is how i do it for word, i think once long ago i found a way to now from VBA what was the URL on the active brouser, this could help me too, tank's.
gabi.
0
 
LVL 26

Expert Comment

by:dannywareham
ID: 22646015
I take it you have his code in Outlook? Or you have it in the section of code that creates the email in Access?

If it's the former, I can't help. The Outlook area may be a better bet, as you cannot use the GetObject with SnapShot Viewer (I believe).

If it's the latter, we can help you to alter your code to save the file as you create the email.

However, if you want the recipient of the email to be doing this, I can't help you.
0
 

Author Comment

by:gabi456
ID: 22646070
yes, i want the racipient of the email to save it, the code i write is in a access application wich get the word document and save it, i now there is no "GetObject" for .snp that's way i need help...
but i belive is a way to found out from vba wich URL is now at the browser, if you can help me with that, it's would solve my problem, tank's.
0
 
LVL 26

Expert Comment

by:dannywareham
ID: 22646091
Browser?
I'm not following. Where's the internet in this?

I'm imagining your flow is like this:

1. Database creates report
2. Database emails it to a user
3. User opens email
4. Code fires which saves the attachment to a user-defined location

Is that correct?
Where's the "browser"?

I'm off to bed now, but will check back in the morning (about 9 hours away).
0
 

Author Comment

by:gabi456
ID: 22647676
you are right..., i thought that the .snp report  is open by the browser...:-(
the steps you write are correct, but the last step is the problem, i can't do it.
i would like to have a Code (from other application) which saves the open attachment, or close it's good either, (by the whay, the attachment have allways the same name, is it help?)  to a user-defined location, this is my problem, you thing there is a solution?
tank's
gabi adam

0
 
LVL 26

Accepted Solution

by:
dannywareham earned 1500 total points
ID: 22647899
You can't create the solution through Access.
You'll need to write a value to the Outlook mail that is unique.
Then have a piece of code in Outlook to look for that value.
If it exisits, fire your event.

This is one for the Outlook gurus though.
Sorry chap.
0

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

The Windows Phone Theme Colours is a tight, powerful, and well balanced palette. This tiny Access application makes it a snap to select and pick a value. And it doubles as an intro to implementing WithEvents, one of Access' hidden gems.
Microsoft Access is a place to store data within tables and represent this stored data using multiple database objects such as in form of macros, forms, reports, etc. After a MS Access database is created there is need to improve the performance and…
Using Microsoft Access, learn some simple rules for how to construct tables in a relational database. Split up all multi-value fields into single values: Split up fields that belong to other things into separate tables: Make sure that all record…
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

650 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question