Solved

Launching a attachment using LS

Posted on 2004-08-17
10
257 Views
Last Modified: 2013-12-18
Hi all,

I like to launch a attachment using LS! I want to launch the attachment from a view (the document that is selected)

Is there a way to do this ?

Greetings,

Bob
0
Comment
Question by:oosterbaan
[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
  • 3
  • 2
  • 2
  • +2
10 Comments
 
LVL 19

Expert Comment

by:madheeswar
ID: 11818827
in form properties, there is auto launch attachments.
Select that property.
And in action button in View,
@Command([EditDocument])

and in form postopen,
Source.close
0
 
LVL 1

Author Comment

by:oosterbaan
ID: 11819111
Hi madheeswar,

Thx for your comment!

Hmmm....this is a nice idea, but the user will not be able to open the document whitout starting the attachment!
Isn't there a way to start the attachment from the harddrive? You can then detach the file in a temp folder and then start it?

Greetings,

Bob
0
 
LVL 19

Expert Comment

by:RanjeetRain
ID: 11821228
Is the name of the attachment fixed in all the cases?
Is this a normal memo? Or based on some other form?
How was the document attached? Is it embedded in a RT field?
0
Industry Leaders: 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!

 
LVL 19

Expert Comment

by:RanjeetRain
ID: 11821434
Okay, assume that it is a normal memo. How would u detach and launch attachments? Here is the code. Put it in an agent and then u r ready to go.




Sub Initialize
      Dim SN As NotesSession
      Dim DB As NotesDatabase
      Dim DC As NotesDocument
      
      Set SN = New NotesSession
      Set DC = SN.DocumentContext
      
      Dim rtitem As Variant
      Set rtitem = DC.GetFirstItem( "Body" )
      If ( rtitem.Type = RICHTEXT ) Then
            Forall o In rtitem.EmbeddedObjects
                  Call o.ExtractFile ("c:\temp\" + "give_a_name_here")
            End Forall
      End If
End Sub


0
 
LVL 19

Accepted Solution

by:
RanjeetRain earned 63 total points
ID: 11821520
And if they are not embedded in a RT field, rather directly attached, you may use the GetAttachment method of NotesDocument class to get to the attachment. Here is the sample code:




Sub Initialize
      Dim SN As NotesSession
      Dim DB As NotesDatabase
      Dim DC As NotesDocument
      
      Set SN = New NotesSession
      Set DC = SN.DocumentContext
      
      Dim object As NotesEmbeddedObject
      Set object = DC.GetAttachment("attachment_file_name")
      If (Not object Is Nothing) Then
            ' Detach and Launch the object as shown above
      End If
End Sub


0
 
LVL 31

Assisted Solution

by:qwaletee
qwaletee earned 62 total points
ID: 11823356
I've provided solutions for this in teh past on this site.  You would need an action button on the view that when clicked, accesses the highlighted document, finds any attachments, gives an error if there are none or if there is more than one.

If there is only one, it should detach the file and use the shell function to "call" that file from the OS, which is (hopefully) configured to support the file's extension.

The tricky things I set up were:

1) Detaching the file to a location the user has privileges to (you can't just assume a particular folder if different PC's are set up differently or your Windows admins have locked down access to certain directories).

2) Handling conflicting file names

3) Cleaning up after yourself -- you don't want the file staying there forever!
0
 
LVL 63

Expert Comment

by:Zvonko
ID: 13004819
0
 
LVL 63

Expert Comment

by:Zvonko
ID: 13004848
No comment has been added to this question in more than 21 days, so it is now classified as abandoned.

I will leave the following recommendation for this question in the Cleanup topic area:
    Split: RanjeetRain {http:#11821520} & qwaletee {http:#11823356}

Any objections should be posted here in the next 4 days. After that time, the question will be closed.

Zvonko
EE Cleanup Volunteer
0
 
LVL 31

Expert Comment

by:qwaletee
ID: 13009182
Zvonko,

A cleanup volunteer providing solutions as well?  Cute!
0

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Problem "Can you help me recover my changes?  I double-clicked the attachment, made changes, and then hit Save before closing it.  But when I try to re-open it, my changes are missing!"    Solution This solution opens the Outlook Secure Temp Fold…
Notes Document Link used by IBM Notes is a link file which aids in the sharing of links to documents in email and webpages. The posts describe the importance and steps to create a Lotus Notes NDL file in brief.
There's a multitude of different network monitoring solutions out there, and you're probably wondering what makes NetCrunch so special. It's completely agentless, but does let you create an agent, if you desire. It offers powerful scalability …
This is my first video review of Microsoft Bookings, I will be doing a part two with a bit more information, but wanted to get this out to you folks.

728 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