Solved

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

Posted on 2008-10-05
11
464 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
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
 

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
How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

 

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 500 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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

The first two articles in this short series — Using a Criteria Form to Filter Records (http://www.experts-exchange.com/A_6069.html) and Building a Custom Filter (http://www.experts-exchange.com/A_6070.html) — discuss in some detail how a form can be…
I see at least one EE question a week that pertains to using temporary tables in MS Access.  But surprisingly, I was unable to find a single article devoted solely to this topic. I don’t intend to describe all of the uses of temporary tables in t…
Familiarize people with the process of utilizing SQL Server views from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Microsoft Access…
With Microsoft Access, learn how to specify relationships between tables and set various options on the relationship. Add the tables: Create the relationship: Decide if you’re going to set referential integrity: Decide if you want cascade upda…

708 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

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now