Can't find the information you are looking for here? Then leave a message over on our WinBatch Tech Support Forum.
Keywords: OLE null
WordObj = ObjectOpen("Word.Basic") WordObj.FileOpen("c:\a.doc")This simply opens up a document within Word. However, the FileOpen macro/method contains many other parameters (in additon to the file to open). Sometimes I wish for one of these parameters to be NULL. I can't seem to get past this problem. For example, this doesn't seem to work:
WordObj.FileOpen("c:\a.doc", 1, 1, 1, , , 0)I get the error "Type mismatch".
The problem seems to be with the null parameters. This doesn't work either:
WordObj.FileOpen("c:\a.doc", 1, 1, 1, "", "", 0)I can't seem to pass a null value via OLE to a Wordbasic macro/method.
What am I missing? I can't find a syntax that works.
mynull=BinaryAlloc(10) BinaryPoke(mynull,0,0)and use the mynull variable where you need a null in the parameter string.
Article ID: W13671
Filename: OLE and Word Basic.txt
File Created: 1999:04:15:16:55:36
Last Updated: 1999:04:15:16:55:36