OLE -> DocumentsOpen

T

Tom Guarino

Hi all,

I am using the following code to open a word document. I don't want the
document to appear on the MRU list, so I am sending False for the
AddToRecentDocuments parameter. However, it is not working, it still puts
the filename on the MRU list.

I have tried the ReadOnly attribute and it works, so I know I am calling the
correct function inside the OLE, but I need confirmation on the order of my
parameters, or other comments.

Function DocumentsOpen OLEVariant lFileName OLEVariant lReadOnly
OLEVariant lAddToRecentFiles Returns LPDispatch
Local LPDispatch lretVal
Send DeclareParams 10
Send DefineOLEVariantParam lFileName
Send DefineOLEVariantParam OLE_VT_OPTIONAL
Send DefineOLEVariantParam lReadOnly
Send DefineOLEVariantParam lAddToRecentFiles
Send DefineOLEVariantParam OLE_VT_OPTIONAL
Send DefineOLEVariantParam OLE_VT_OPTIONAL
Send DefineOLEVariantParam OLE_VT_OPTIONAL
Send DefineOLEVariantParam OLE_VT_OPTIONAL
Send DefineOLEVariantParam OLE_VT_OPTIONAL
Send DefineOLEVariantParam OLE_VT_OPTIONAL
Get InvokeLPDispatchFunction 12 To lretVal
Function_Return lretVal
End_Function


Thanks for any help.

Tom
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top