Hi,
I have a form created but i would like a way to allow user to attach a document, they will be on a different network so it will not be froma shared drive, if this is at all feasible.
Trish123
Hi,
I have a form created but i would like a way to allow user to attach a document, they will be on a different network so it will not be froma shared drive, if this is at all feasible.
Trish123
Re: Link to upload a document
If you mean you want to add a link on a userform to a document, then that's easy, all depending on what you mean by "...they will be on a different network".
If you can 'see' the document using Windows Explorer no problem, if you can't then I can't see how you can 'link' to it. Either way, a copy of your workbook/userform would be helpful.
Re: Link to upload a document
Hi Grimes 0332,
I will be sending a basic information form to persons, but i am looking for a way for them to attach a document to the form i know i will be able to get them to forward the attachment along with the form anyway but if it is possible for me to even have a button or an option for them up upload file. so when it is sent back to me all i would have to click on is place on the form. again i dont know if this is even possible, as i am just an intermediate user of excel and only very basic programming skills.
Re: Link to upload a document
I assume you mean you're sending a workbook to someone. They fill in some details on a userform and send the workbook back to you?
If so you can easily embed another file or files (document, workbook, picture, basically anything) in the workbook so it will be available to anyone who later opens the workbook. This will be a static copy of the original file so later updates will not be included.
Re: Link to upload a document
How would i get them to do this, Button?
Re: Link to upload a document
However you want to do it.
You have not given enough information for a specific answer but, in general, you can embed a file using syntax like
Sheets("SheetName").OLEObjects.Add Filename:="C:\Add\FileName\Here.doc", Link:=False, DisplayAsIcon:=True
That doesn't include giving the user the option to select a file, it could be the file name and location is fixed so you can just refer to it in code - but you haven't said anything about that.
Re: Link to upload a document
[TABLE="width: 1155"]
4.
[/td]Please attach a Map if available when returning this document.
[/td]
[TD="colspan: 3"] [/TD]
[/TABLE]
I dont have anything else really just above really, but yes i would like then to be able to select a file and upload it sot that it will then be available to me when sent back
Re: Link to upload a document
One problem with forums - it's easy to say you have a problem/want to do something. 1 problem with Excel - it has a lot more than 9 ways to skin a cat.
I did ask for a copy of your workbook earlier but in the absense of, assumptions have been made.
As you mentioned "attach a Map", I'll assume you want to insert a picture. I also assume this picture is to be added to a new worksheet and will be called from a button on the userform.
Sub Macro1()
Dim ws As Excel.Worksheet
Dim ThisWs As Excel.Worksheet
Dim vFile As Variant
' Remember the current worksheet
Set ThisWs = ActiveSheet
'Show Excel Open Dialog Form
vFile = Application.GetOpenFilename("All Files (*.*)," & _
"*.*", 1, "Select Map", "Select", False)
'If Cancelled then exit
If TypeName(vFile) = "Boolean" Then Exit Sub
' Add a new worksheet for the picture
Set ws = ThisWorkbook.Sheets.Add(After:=Sheets(Sheets.Count))
' Set some properties and place Top Left of cell A1
With ws.Pictures.Insert(vFile)
.ShapeRange.LockAspectRatio = msoTrue
.Left = ws.Cells(1, 1).Left
.Top = ws.Cells(1, 1).Top
.Placement = 1
.PrintObject = True
End With
ThisWs.Activate
End Sub
Display More
Add that to a standard module (Rename the procedure if you want) and call it from the button Click event.
Re: Link to upload a document
Hi Grimes 0332,
Thank you so very much for that, but with regards to the map, this may be a picture but is also could come in a pdf. version or maybe even pasted onto a word document.
granted I have not sent on the form but all i have is the question asking to upload map if available and to enter contact details etc, i am just trying to make it as user friendly as i possibly can.
Re: Link to upload a document
Quotethis may be a picture but is also could come in a pdf. version or maybe even pasted onto a word document
That should have been explained in your first post - 99 ways and all that.
It's a small change, just use the first line of code I posted rather than the 'InsertPicture' line - you will have to try a few of the available settings to get it to display as a document or pdf rather than as an icon.
Re: Link to upload a document
What/where do you actually want to 'attach'/'upload' the document to?
Re: Link to upload a document
Grimes0332
apologies i know i am trying to explain as best i can, when i am inserting this code how do i reflect this on the cell , am i to put in a button for the to press, and then put this code onto the button. and when the pdf, word or picture document is uploaded how is it shown so that when it comes back to be that i can just click on it to open it on my side.
Re: Link to upload a document
Please upload a copy of your workbook.
There's some standard text to describe how to upload but I can't fins an example right now, perhaps one of the regulars would be good enough to post it, but click the Go Advanced button below to reply and then 'Manage Attachments'
Don’t have an account yet? Register yourself now and be a part of our community!