?
Solved

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

Posted on 2008-10-05
11
Medium Priority
?
480 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
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

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

What is SQL Server and how does it work?

The purpose of this paper is to provide you background on SQL Server. It’s your self-study guide for learning fundamentals. It includes both the history of SQL and its technical basics. Concepts and definitions will form the solid foundation of your future DBA expertise.

Question has a verified solution.

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

Phishing attempts can come in all forms, shapes and sizes. No matter how familiar you think you are with them, always remember to take extra precaution when opening an email with attachments or links.
As tax season makes its return, so does the increase in cyber crime and tax refund phishing that comes with it
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…
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …
Suggested Courses

764 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