[2 days left] What’s wrong with your cloud strategy? Learn why multicloud solutions matter with Nimble Storage.Register Now

x
?
Solved

Launching a attachment using LS

Posted on 2004-08-17
10
Medium Priority
?
260 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
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 
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 252 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 248 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

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!

Question has a verified solution.

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

For users on the Lotus Notes 8 Standard client, this article provides information on checking the Java Heap size and adjusting it to half of your system RAM in attempt to get the Lotus Notes 8.x Standard client to run faster.  I've had to exercise t…
I thought it will be a good idea to make a post as it will help in case someone else faces these issues. I trust this gives an idea how each entry in Notes.ini can mean a lot for the Domino Server to be functioning properly. This article discusses t…
Are you ready to place your question in front of subject-matter experts for more timely responses? With the release of Priority Question, Premium Members, Team Accounts and Qualified Experts can now identify the emergent level of their issue, signal…
Is your data getting by on basic protection measures? In today’s climate of debilitating malware and ransomware—like WannaCry—that may not be enough. You need to establish more than basics, like a recovery plan that protects both data and endpoints.…
Suggested Courses

649 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