Jump to content
Sign in to follow this  

ActiveX FP7

Recommended Posts

OK... So i was developing a DB is FP5 and have converted it to FP7 (using Dev). Pretty much all aspects of the DB in development are working well... But I need to call scripts from MSWord. This was working in FP5. So, I made the (what I thought were) the proper changes and it still didn't work.

So, I created this simple VBA script and it doesn't work either. It assumes that there is an open DB, which there is, and that there is a Script named "_DDE_OK", which there is (it just sets a text field to "OK" and execs a SendMessage.) The msgbox in work fine and there are no VBA errors.

Sub CallFM()


    ' FMpro Stuff


    ' Declare object variables


    Dim FMApp As FMPRO70Lib.Application

    Dim FMDocs As FMPRO70Lib.Documents

    Dim FMActiveDoc As FMPRO70Lib.Document


    ' Launch FileMaker


    Set FMApp = CreateObject("FMPRO.Application")


    ' Set the documents object


    Set FMDocs = FMApp.Documents


    ' Make FileMaker visible (when launching from automation, FileMaker

    ' remains hidden by default.)


    ScriptName = "_DDE_OK"


    Set FMActiveDoc = FMDocs.Active


    FMActiveDoc.DoFMScript (ScriptName)

    FMApp.Visible = True

    res = MsgBox(FMActiveDoc.FullName & "-" & ScriptName, vbOKOnly, "Sent")

End Sub

BTW, this FP7 DB is being served remotely by Server 7.

HELP!!!! :

Share this post

Link to post
Share on other sites

OK... So, I discover that it magically starts working when I check the called script "Include in the menu". This was not necessary in FP5.

Anyone know a workaround?

I really don't want the scripts that I am calling from Word to be in the Menu List.

Share this post

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this  

  • Create New...

Important Information

By using this site, you agree to our Terms of Use.