Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×
The Claris Museum: The Vault of FileMaker Antiquities at Claris Engage 2025! ×

This topic is 6381 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Posted

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!!!! :

Posted

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.

This topic is 6381 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

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