How to make sure users can only download file from the attachment control but not be able to upload or remove it - sharepoint-2010

I'd like to create a read-only view in the infopath.However when I disable the attachment control ,user can not download the file at all.How to make sure users can only download file from the attachment control but not be able to upload or remove it.

If you are customizing a SharePoint List form, you will not be able to set the File Attachment control to read only. However, I was able to work around this, and this will work for you even if it's just a regular form, by using repeating sections with hyperlink controls inside.
In the Fields pane, click on Show Advanced View
Expand Attachments so you can see the attachmentURL field
Drag attachmentURL into the form and choose Repeating Section with Controls
Click in the section and press CTRL-K to insert a Hyperlink
Enter . in Data Source for Link to
Enter . in Data Source for Display
There are some gotchas and workarounds for some problems you may encounter. See more details on my blog post http://vincepangan.com/?p=220

context menu -> Properties, there is a check box (the first one) on the first tab, make sure it is not checked.
EDIT: If your view is read-only, you cannot download the attachment. The workaround is to clear the read-only checkbox of the view, and activate the read-only on all other controls. The attachment control can be configured to not allow upload/modification of the attachment. This means that in order to upload or modify an attachment, you'll need an other view.
See also entries on msdn:
http://social.msdn.microsoft.com/Forums/en/sharepointinfopath/thread/1106f090-7767-431f-a699-b81c1173c2ee
http://social.msdn.microsoft.com/Forums/en-US/sharepointinfopath/thread/36c07bd7-a5ba-4fa0-b992-e9a94103dbf4
http://social.technet.microsoft.com/Forums/sr-Latn-CS/sharepoint2010customization/thread/412e80ce-badb-4467-a2d1-7e1696774058

Related

How to edit a Word document that opens in read-mode in VBA

I am editing Word documents I get from clients with VBA, and the clients often give them to me in an 'uneditable view'. Thus, I would like to 'enable editing' in within my macro before doing my tasks.
Note that I did not say the document is in 'read-only' as I do not think it is (I do not see the [read only] text in the document title bar when I open it manually). I have also tried setting readOnly=false as described in this post, but it did not make a difference to how the document opened. what I am seeing when I open the document manually is a '2-page view' with arrows on the sides to page forward/back, and when I try to edit the document I see a status message in the lower-left corner of the document's frame: This modification is not allowed because this document is opened for viewing only. I can manually make the document editable by going to View > Edit Document.
I spent a while searching for this one as I didn't know the view was called 'read-mode', so I thought it was worth sharing. My strategy was to 'toggle off read-mode' once I opened my document with this line:
ActiveDocument.ActiveWindow.View.ReadingLayout = False
REF: https://msdn.microsoft.com/en-us/vba/word-vba/articles/view-readinglayout-property-word

How to navigate to specific contents of madcap flare's document from vb.net code?

We have been using PDF file as a part of help docs in our vb.net desktop application. In PDF, we would traverse to the certain chapter in the PDF doc.
Now we have decided to use MadCap Flare as documentation tool. We have a menu item in vb.net form for documentation. On click of the link, we want to open the specific chapter of the Flare documentation.
You know managing content with single-source XML authoring is possible when using MapCad Flare (I'm not using Flare!). You can publish content to an increasing number of formats including HTML5, WebHelp, PDF, Word, XHTML, Clean XHTML, EPUB, DITA and more by MapCad Flare.
So, you may continue using PDF and the way connecting your vb.net desktop application help.
Using HTML based topics maybe another solution for your needs by creating Help for a form, a dialog or control with HTML files (See also: Help for controls with VB .NET).
Properties to display help (HTML file - local)
Activate the hlpProvider component hlpHtmlLocal and set the HelpNameSpace property of hlpHtmlLocal to the file name you want to work with.
We open a local HTML file with the dialog using the little button to the right.
The next step is to set the HelpNavigator property of a control (e.g. button) to a value of the HelpNavigator enumeration (see table below). Here we use Topic.
When the application is running click the HelpButton to enable "What's this .." Help. The cursor changes. Now click the button or press F1 when the button has focus. This will open the single HTML file in your browser.
It seems you can't use anchor names to jump to a specific part of your HTML file.
Properties to display help (HTML file - Server http://..)
Activate the hlpProvider component and set the HelpNameSpace property of hlpHtmlServer to the file name you want to work with. Here we use a http:// address of a single HTML file. If you provide the file on your company server, you don't have to update the help file with the customer.
The next step is to set the HelpNavigator property of a control (e.g. button) to a value of the HelpNavigator enumaration (see table below). Here we use Topic. Then we set the HelpKeyword on hlpHtmlSever property to e.g. "anchor3". Don't add a leading "#". Leave it empty if you want to open a HTML file without anchors. The Help Handles cmdControl2.Click Dim sHelpFile As String Dim sStartupPath As String '--- Initialize context-sensitive help --- Keyword property provides the key information to retrieve the help associated with the control.
When the application is running click the HelpButton to enable "What's this .." Help. The cursor changes. Now click the button or press F1 when the button has focus. This will open the single HTML file over the Internet in your browser.

No Access to Template's Document

I have an existing Macro Enabled Template which I would like to add Content Control to, to be available on the screen when the Template is accessed.
I know how to add the Content to a Word Document and then save it as a Template. The problem is that I cannot view the Exisiting Template's Word Document due to the view Object being greyed out. See below:
I really do not want to copy all my Macros and my quick texts over to a new document just to add one line of text and a button.
I can easily add the required text and CommandButton by having a script run in a Document_New Sub under the ThisDocument. The problem is that this Sub bombs out due to Macros not being enabled. I intend to have the Template distributed to numerous colleagues, therefore having the Text and button on the document will avoid any confusion as to what to do with the template.
You need to open the Template via File - Open
Opening the Template this way will display give you access to the Template.
For info: The name of the Template will appear in the Center of the Word Application.

Disable user from saving .aspx content from browser by using "saving as" option

I have a .net website.
I need to disable the save as option from browser so that the user cant save some of the website pages in order to protect their content.I did disable right click.But user can select save as from browser's menu.
Is it possible to do that?
It is difficult to lock down a website by disabling the save button. What is to stop a user just copying the text and pasting to another document. Right clicking an image and saving. Then there are differences between browsers etc. If you need to protect you information you may need to look at creating and displaying PDFs but this is also not an easy thing especially if the site is dynamic.
What you want is impossible. If the user is able to read the information on his/her screen, there is always an option to copy the content.
How would you stop the user from taking a picture from his/her screen with a digital camera for example?

Hide few fields in EditForm.asx of Picture Library in sharepoint 2010

I have a picture library and added few fields to it. When i click add new item from picture library, the EditForm.aspx appears after uploading the picture. This form contains many fields of which I want to hide Title, Date Picture Taken, Description, and Keyword. In short the EditForm should contain only Name, Preview and the columns that I have added. Is it possible to hide the other columns? I want to perform this out of the box.
Several possibilities.
You can use SharePoint Designer to manipulate the NewForm, EditForm and DisplayForm. Edit the existing form, use CSS to set the out of the box HTML form to hidden, then add a new custom form to the page and remove the columns you don't want to see.
If you don't want to use these columns at all, just delete them in the Library settings
If you don't want to delete the columns, click the parent content type in the Library settings, then edit each column and set it to "hidden"
Check this out: http://sarangasl.blogspot.in/2009/10/hide-column-in-edit-new-or-display-mode.html
I found this solution to be really simple and effective. Very well documented and descriptive.