>oWordBasic.fileNew('Template.dot')
>
>I.e. you must call using parentheses and arguments rather than the 'named arguments' syntax you are trying to use.
>
>
>
>===================================
>This will not work:
>
> oWordBasic = CREATEOBJECT('Word.Basic')
> oWordBasic.Appshow
> oWordBasic.FileNew.Template = 'TEMPLATE.DOT'
>
> The following error occurs:
> FileNew does not evaluate to an object member.
>
> If you look in WordBasic it should be something like this:
>
> FileNew .Template = 'TEMPLATE.DOT'
>
> How do you call this func from VFP5???
>
> /Magnus
Ok this works fine now, but Word will not stay open after I've done all
the bookmark insert. It just closes on me. The only way I can get it to stay
open is if I start Word firts.
Any ideas???
The code:
oWordBasic = CREATEOBJECT('Word.Basic')
oWordBasic.Appshow
oWordBasic.FileNew('TEMPLATE.DOT')
IF oWordBasic.ExistingBokkmark('Bookmark') <> 0
oWordBasic.EditGoTo('Bookmark')
oWordBasic.Insert('Test')
ENDIF
* End of code and Procedure and word closes
/Magnus
Magnus NordinVFP MCP
"We have tested the GUI on 5-year olds. Why? Beacuse they aren't braindead!"
Michael Spindler, Apple