July 17, 200718 yr 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! :
July 18, 200718 yr Author 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.
Create an account or sign in to comment