Problem solve Get help with specific problems with your technologies, process and projects.

Error: 'Use the file open Dialog box to locate document'

I attach a file and then I created a button for opening it. My is formula:
"winword.exe";@AttachmentNames ). 

Unfortunately, this error message appears, "Use the file open Dialog box to locate document." When I right click on the file attachment it opens just fine. Do you know what's wrong with my formula?

The problem is that "winword" (Microsoft Word) is looking for files in your local file system with the same names as the attachments in your document. But the files are not in your local file system -- they're inside a Notes document in a Notes database. Word doesn't know how to get them from there.

Look at the AttachmentLaunch @Command. Note, however, you need to have the attachment selected on screen for this to work. Sometimes you can arrange for this using commands such as @Command([EditBottom]), to steer the cursor to where the attachment appears.

You can also use a combination of EditDetach and Execute @Commands, that don't require the attachment be highlighted. But for this, you need a directory to detach them to. Do not detach files to the current directory, because this is usually the Notes executable directory, and you risk overwriting files that Notes needs to function. If you know there is a temporary directory on each user's workstation with the same path, you can use that.

For instance, you might write:

@For(i := 1; i <= @Attachments; i := i + 1; 
@AttachmentNames[i]; "C:Temp" + 
"C:Temp" + @AttachmentNames[i]) 
)  ) 

Note that it is not usually necessary to explicitly call winword to launch a Microsoft Word file because if Word is correctly installed, the operating system already knows that it should be used to open .doc files.

If for some reason the above doesn't work for you, you can do something similar in LotusScript using the ExtractFile method and Shell function.

Do you have comments on this Ask the Expert question and response? Let us know.

Dig Deeper on Lotus Notes Domino Formula Language

Start the conversation

Send me notifications when other members comment.

Please create a username to comment.




  • iSeries tutorials

    Search400.com's tutorials provide in-depth information on the iSeries. Our iSeries tutorials address areas you need to know about...

  • V6R1 upgrade planning checklist

    When upgrading to V6R1, make sure your software will be supported, your programs will function and the correct PTFs have been ...

  • Connecting multiple iSeries systems through DDM

    Working with databases over multiple iSeries systems can be simple when remotely connecting logical partitions with distributed ...