G
G.Miller
Help please!
I have a mac running Word X SR1 and OS10.3.6
I created an applescript that copies data from a filemaker pro 6 database to
a variable and inserts it into a word document. Works great.
Then I upgraded to filemaker pro 7 and suddenly word does not like it
anymore. An example of each script is below:
FMpro6:
Tell application "Filemaker Pro 6"
Set myData to cell "field_name" of current record of database
"database.fp5"
End tell
Tell application "Microsoft Word"
Activate
Set contents of selection to myData
End tell
FMpro7:
Tell application "Filemaker Pro 7"
tell layout "layout_name"
Set myData to cell "field_name" of current record
End tell
End tell
Tell application "Microsoft Word"
Activate
Set contents of selection to myData
End tell
When I run the FMpro6 script, the class of myData is 'string'
When I run the FMpro7 script, the class of myData is 'Unicode Text'
Does microsoft word not accept Unicode Text?
I have tried to change the class by adding:
Set myData2 to myData as string
But I still get the error when I try to insert the data in word.
The error I get is
"Microsoft Word cannot set contents of selection to "whatever text is in the
field"
If anyone has any insight, I would much appreciate it.
Thanks,
G.Miller
I have a mac running Word X SR1 and OS10.3.6
I created an applescript that copies data from a filemaker pro 6 database to
a variable and inserts it into a word document. Works great.
Then I upgraded to filemaker pro 7 and suddenly word does not like it
anymore. An example of each script is below:
FMpro6:
Tell application "Filemaker Pro 6"
Set myData to cell "field_name" of current record of database
"database.fp5"
End tell
Tell application "Microsoft Word"
Activate
Set contents of selection to myData
End tell
FMpro7:
Tell application "Filemaker Pro 7"
tell layout "layout_name"
Set myData to cell "field_name" of current record
End tell
End tell
Tell application "Microsoft Word"
Activate
Set contents of selection to myData
End tell
When I run the FMpro6 script, the class of myData is 'string'
When I run the FMpro7 script, the class of myData is 'Unicode Text'
Does microsoft word not accept Unicode Text?
I have tried to change the class by adding:
Set myData2 to myData as string
But I still get the error when I try to insert the data in word.
The error I get is
"Microsoft Word cannot set contents of selection to "whatever text is in the
field"
If anyone has any insight, I would much appreciate it.
Thanks,
G.Miller