Solved

Attachment properties.

Posted on 2004-10-18
8
356 Views
Last Modified: 2013-12-18
When you click on browse button to attach a file, the directory screen comes up and file type is defaulted in Lotus Notes type. Question, how can you change this default to All file Types instead of LN file types?
0
Comment
Question by:cyle
8 Comments
 
LVL 19

Expert Comment

by:RanjeetRain
ID: 12339179
Is this for web or for client?
0
 
LVL 31

Expert Comment

by:qwaletee
ID: 12339186
You can't modify the properties of the built-in attachment dialog function.  However, I have never seen the behavior you describe -- the built-in choose attachment dialog does even display a file type dropdown.  Most likely, you have a a custom button for attaching a file that using script or formula, displays a dialog box for choosing a file, then executes the Notes functions for attaching that file.
0
 

Author Comment

by:cyle
ID: 12339398
It is for client. I know that there is a drop down where in you can choose what file type you need but it needs to be changed to .doc file type (default) or word instead of LN type. A very small detail if you ask me but we are just the programmer, right.
0
 
LVL 14

Expert Comment

by:p_partha
ID: 12341031
0
How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

 
LVL 31

Expert Comment

by:qwaletee
ID: 12349259
Cyle,

Please confirm -- you are talking about a cutsome button or action that uses formula or lotusscript to launch the browser dialog, correct?

The @Prompt([LocalBrowse]...) does as you describe, and can't be changed.  However, the LotusScript equivalent, NotesUiWOrkspace.SvaeFileDialog, doe sallow you to specify file types, in both R5 and R6.  You may want to switch to using that.  Note that it is called SaveFIleDialog, but it does not have anythingto do with saving... you can use it as part of a script to save something, which is where I think Lotus thought it would be used, hence the name.  But it can also be used for other purposes.
0
 
LVL 19

Expert Comment

by:RanjeetRain
ID: 12349917
The article pointed by partha is neat. I was trying to accomplish this with Windows API (I didn't know about this hidden API call at all). I wrote a little agent to test that code, and it worked wonderfully. I liked the solution. Here is the code:



'Test2:

Option Public




Declare Function NEMGetFile Lib "NNOTESWS" Alias "NEMGetFile" _
( zero As Integer, Byval filename As String, Byval filter As String, Byval title As String ) As Integer


Sub Initialize
      ' This shows word documents by default with an option to select other files
      Call LocalBrowse ("Select the file to open", "", "Word documents|*.doc|All documents|*.*|")
      
      ' This shows only word documents
      Call LocalBrowse ("Select the file to open", "", "Word documents|*.doc|")
End Sub



Function LocalBrowse(title As String, default As String, filter As String) As String
      Dim filename As String*1024
      filename = default
      If filter = "" Then filter = "All Files|*.*|"
      status% = NEMGetFile(0, filename, filter, title)
      
      Select Case status%
      Case 0 : LocalBrowse = "" ' cancelled
      Case 1 : LocalBrowse = Trim$(filename)
      Case Else : Error 1000, "Error &H" & Hex$(status%) & " in LocalBrowse"
      End Select
End Function

0
 
LVL 19

Expert Comment

by:RanjeetRain
ID: 12349960
Not that Qwaletee's solution doesn't work. That works too. Afterall, this dialog merely returns a filename. What to do with that file name is entirely upto the programmer.
0
 
LVL 31

Accepted Solution

by:
qwaletee earned 500 total points
ID: 12390971
Actually, the NotesUiWorkspace.SaveFileDialog (or Notes.UiWOrkspace.OpenFileDialog) passes trhough directly to that WIndows API call, so there is absolutely no reason to define the Windows API call and use it directly... just a waste of effort.  That code is only useful for 4.x clients.
0

Featured Post

Free Trending Threat Insights Every Day

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

Suggested Solutions

For Desktop Techs: How to retain a user's Notes configuration data when swapping out the end user's computer. (Assuming that you are not upgrading to a completely different version of Notes client) All you need to do is: 1) install Notes o…
I thought it will be a good idea to make a post as it will help in case someone else faces these issues. I trust this gives an idea how each entry in Notes.ini can mean a lot for the Domino Server to be functioning properly. This article discusses t…
Here's a very brief overview of the methods PRTG Network Monitor (https://www.paessler.com/prtg) offers for monitoring bandwidth, to help you decide which methods you´d like to investigate in more detail.  The methods are covered in more detail in o…
In this tutorial you'll learn about bandwidth monitoring with flows and packet sniffing with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're interested in additional methods for monitoring bandwidt…

746 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now