A action button to open a embedded object

Posted on 2006-05-12
Last Modified: 2013-12-18
If a pick a place in my form and then

Create Object
Object From File
display as icon

What I need now is a button that when clicked the document opens.  I need help with the script.

Question by:Jaziar
    LVL 19

    Expert Comment

    Did not understood ...

    if you are looking to open a document:
    then @Command([opendocument])

    for Embeddeding in an existing document or a new document, use:
    @PostedCommand ( [EditInsertFileAttachment] )

    Author Comment

    I am needing to place a word document in the form.  Each time a new document is created the base word doc is there.  In each document the user will make changes to the Word doc and save it.  So each document in the database will have a differnt word doc in it after the user had made changes.  I was advised in  a earlier question to embed the word doc as a ole object.  So I am needing a way for the user to click a button that will open the word doc for edit.  Right now if you double click the Icon it works, but for many users they need a simple button to click.
    LVL 46

    Expert Comment

    by:Sjef Bosman
    Wild guess:


    Otherwise, I don't think this is possible :|
    LVL 22

    Expert Comment

    Hi Jaziar,
    take a look at Microsoft Office Library (7) template

    You have it in your Data folder (no 7 is for LN version 7, put appropriate number there).

    Hope this helps,
    LVL 14

    Accepted Solution

    Jaziar, try this. not tested in R6

          Dim ws As New NotesUiWorkspace
          Dim uidoc As NotesUIDocument
          Dim doc As NotesDocument
          Dim wordOLE As NotesEmbeddedObject
          Set uidoc = ws.CurrentDocument
          Set doc = uidoc.Document
          'load the OLE
          Set handleV = uidoc.GetObject("MWD")      
          Forall o In doc.EmbeddedObjects
                If = "MWD"  Then 'name of the embedded object. can be changed by accessing its property                  
                      Set wordOLE = o
                      Exit Forall
                End If
          End Forall
          If Not wordOLE Is Nothing Then
                Call wordOLE.DoVerb("&Edit")
                Msgbox "Word OLE not found!"
          End If      

    Author Comment

    It opens MS WORD then you see a flash of the document and then it is gone, I am not sure if it closing it or what it happening for sure, but it is very close to working.
    LVL 14

    Expert Comment

    same prob testing it in r5. try to debug LS. see if it will close the doc.

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Find Ransomware Secrets With All-Source Analysis

    Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

    For Desktop Techs: How to retain a user's Notes configuration data when swapping out the end user's computer. (Assuming that you are not upgrading to a completely different version of Notes client) All you need to do is: 1) install Notes o…
    Article by: Rob
    Notes 8.5 Archiving Steps and Tips This article covers setting up a Notes archive, and helps understand some of the menu choices making setting up and maintaining a Notes archive file easier.
    Hi everyone! This is Experts Exchange customer support.  This quick video will show you how to change your primary email address.  If you have any questions, then please Write a Comment below!
    Illustrator's Shape Builder tool will let you combine shapes visually and interactively. This video shows the Mac version, but the tool works the same way in Windows. To follow along with this video, you can draw your own shapes or download the file…

    759 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

    9 Experts available now in Live!

    Get 1:1 Help Now