OK, I have made an Add-in, and I will post it so you can download it ready-made. But as this board is also used for learning, I am adding all the steps here to get to the Add-in and how to install it.
Note that the add-in will add a menu item, but is using Excel 1997-2000 code to do so. This means that the menu can be found in Excel 2007+ under an Add-In ribbon tab. I have not given it a real 2010+ Ribbon of its own.
If you want to create the Add-in yourself, then basically you start with an empty new workbook. You can save it as a normal workbook first, later we will save it as an Add-in workbook.
You more or less need to follow the steps above to create the userform and additional code. As I have modified the userform to add some more functionality, here is a screenshot of what my userform looks like in the VBE (VBA Editor)
In addition to the earlier userform I have a few more lables, one of which will show the user an example of what the file names will look like with the data he enters in the Textbox.
Another addition is a checkbox, which when left checked will open Windows Explorer in the folder so the user can see the pdf files.
So create the userform.
The label with 'Example' I have renamed lblExample to make it clear in the code what it is for. I have set the properties to Blue text, so the user will see it better.
The main change in the code (other than the added functionality) is that we can't use 'ThisWorkbook' as that would refer to the Add-in which is more or less invisible to the user, and is not the one on which the actions should take place. So we use 'ActiveWorkbook' instead, which refers to the workbook from which the user will be calling the macro.
So the code behind the Userform now is as follows:
<font face=Courier New><SPAN style="color:#00007F">Option</SPAN> <SPAN style="color:#00007F">Explicit</SPAN><br><br><SPAN style="color:#00007F">Private</SPAN> <SPAN style="color:#00007F">Sub</SPAN> btnCancel_Click()<br> bCancel = <SPAN style="color:#00007F">True</SPAN> <SPAN style="color:#007F00">' flag to avoid opening Windows Explorer</SPAN><br> Unload Me<br><SPAN style="color:#00007F">End</SPAN> <SPAN style="color:#00007F">Sub</SPAN><br><br><SPAN style="color:#00007F">Private</SPAN> <SPAN style="color:#00007F">Sub</SPAN> btnPrint_Click()<br> <SPAN style="color:#007F00">' Print button</SPAN><br> <SPAN style="color:#00007F">Dim</SPAN> i <SPAN style="color:#00007F">As</SPAN> <SPAN style="color:#00007F">Long</SPAN>, j <SPAN style="color:#00007F">As</SPAN> <SPAN style="color:#00007F">Long</SPAN><br> <SPAN style="color:#00007F">Dim</SPAN> vShList <SPAN style="color:#00007F">As</SPAN> <SPAN style="color:#00007F">Variant</SPAN><br> <SPAN style="color:#00007F">Dim</SPAN> sFName <SPAN style="color:#00007F">As</SPAN> <SPAN style="color:#00007F">String</SPAN><br> <br> <SPAN style="color:#00007F">With</SPAN> ListBox1<br> <SPAN style="color:#007F00">' use an array to store the selected sheets</SPAN><br> <SPAN style="color:#00007F">ReDim</SPAN> vShList(1 <SPAN style="color:#00007F">To</SPAN> .ListCount, 1 <SPAN style="color:#00007F">To</SPAN> 1)<br> j = 1<br> <SPAN style="color:#00007F">For</SPAN> i = 0 <SPAN style="color:#00007F">To</SPAN> .ListCount - 1<br> <SPAN style="color:#00007F">If</SPAN> .Selected(i) <SPAN style="color:#00007F">Then</SPAN><br> vShList(j, 1) = .List(i)<br> j = j + 1<br> <SPAN style="color:#00007F">End</SPAN> <SPAN style="color:#00007F">If</SPAN><br> <SPAN style="color:#00007F">Next</SPAN> i<br> <SPAN style="color:#00007F">If</SPAN> j = 1 <SPAN style="color:#00007F">Or</SPAN> TextBox1.Value = vbNullString <SPAN style="color:#00007F">Then</SPAN><br> <SPAN style="color:#007F00">'no sheet was selected or no name was given</SPAN><br> MsgBox "At least one sheets needs to be selected and an output name to be entered", vbCritical<br> <br> <SPAN style="color:#00007F">Else</SPAN><br> <SPAN style="color:#007F00">' we have sheets selected and a valid base name</SPAN><br> j = 1 <SPAN style="color:#007F00">' filename counter</SPAN><br> sFName = ActiveWorkbook.Path & "\"<br> <br> <SPAN style="color:#00007F">For</SPAN> i = 1 <SPAN style="color:#00007F">To</SPAN> <SPAN style="color:#00007F">UBound</SPAN>(vShList, 1)<br> <SPAN style="color:#00007F">If</SPAN> <SPAN style="color:#00007F">Not</SPAN> IsEmpty(vShList(i, 1)) <SPAN style="color:#00007F">Then</SPAN><br> <SPAN style="color:#007F00">'print the sheet</SPAN><br> PrintAsPDF <SPAN style="color:#00007F">CStr</SPAN>(vShList(i, 1)), sFName & vShList(i, 1) & " - " & TextBox1.Value<br> j = j + 1<br> <SPAN style="color:#00007F">End</SPAN> <SPAN style="color:#00007F">If</SPAN><br> <SPAN style="color:#00007F">Next</SPAN> i<br> <SPAN style="color:#00007F">End</SPAN> <SPAN style="color:#00007F">If</SPAN><br> Unload Me<br> <SPAN style="color:#00007F">End</SPAN> <SPAN style="color:#00007F">With</SPAN><br><br><SPAN style="color:#00007F">End</SPAN> <SPAN style="color:#00007F">Sub</SPAN><br><br><br><SPAN style="color:#00007F">Private</SPAN> <SPAN style="color:#00007F">Sub</SPAN> CheckBox1_Click()<br> <SPAN style="color:#007F00">' cancel opening Windows Explorer after printing</SPAN><br> bCancel = <SPAN style="color:#00007F">Not</SPAN> CheckBox1.Value<br><SPAN style="color:#00007F">End</SPAN> <SPAN style="color:#00007F">Sub</SPAN><br><br><SPAN style="color:#00007F">Private</SPAN> <SPAN style="color:#00007F">Sub</SPAN> TextBox1_Change()<br> <SPAN style="color:#007F00">' update the Example file name</SPAN><br> lblExample.Caption = ListBox1.List(1)<br> <SPAN style="color:#00007F">If</SPAN> Len(TextBox1) > 20 <SPAN style="color:#00007F">Then</SPAN><br> lblExample.Caption = lblExample.Caption & " - " & Left(TextBox1.Value, 10) & "..." & Right(TextBox1.Value, 10)<br> <SPAN style="color:#00007F">Else</SPAN><br> lblExample.Caption = lblExample.Caption & " - " & TextBox1.Value<br> <SPAN style="color:#00007F">End</SPAN> <SPAN style="color:#00007F">If</SPAN><br><SPAN style="color:#00007F">End</SPAN> <SPAN style="color:#00007F">Sub</SPAN><br><br><SPAN style="color:#00007F">Private</SPAN> <SPAN style="color:#00007F">Sub</SPAN> UserForm_Activate()<br> <SPAN style="color:#00007F">Dim</SPAN> wsWS <SPAN style="color:#00007F">As</SPAN> Worksheet<br> <br> <SPAN style="color:#007F00">' fill the list box with all sheet names, but not Main_List</SPAN><br> <SPAN style="color:#00007F">For</SPAN> <SPAN style="color:#00007F">Each</SPAN> wsWS <SPAN style="color:#00007F">In</SPAN> ActiveWorkbook.Worksheets<br> <SPAN style="color:#00007F">If</SPAN> wsWS.Visible = xlSheetVisible <SPAN style="color:#00007F">Then</SPAN><br> <SPAN style="color:#007F00">' Hidden sheets should not be included: _<br> 1. they won't print (error) _<br> 2. there is a reason the are hidden</SPAN><br> <br> ListBox1.AddItem (wsWS.Name)<br> <SPAN style="color:#00007F">End</SPAN> <SPAN style="color:#00007F">If</SPAN><br> <SPAN style="color:#00007F">Next</SPAN> wsWS<br> <br> <SPAN style="color:#007F00">' put a default name for the base PDF name</SPAN><br> TextBox1.Value = Left(ActiveWorkbook.Name, InStr(1, ActiveWorkbook.Name, ".") - 1)<br><SPAN style="color:#00007F">End</SPAN> <SPAN style="color:#00007F">Sub</SPAN><br><br></FONT>
Then we have the code which calls the userform, ie the code that runs when the user clicks on the menu item (or calls it from the macro dialog). The code is sitting in a normal module.
This code now looks as follows:
<font face=Courier New><SPAN style="color:#00007F">Option</SPAN> <SPAN style="color:#00007F">Explicit</SPAN><br><br><SPAN style="color:#00007F">Public</SPAN> bCancel <SPAN style="color:#00007F">As</SPAN> <SPAN style="color:#00007F">Boolean</SPAN> <SPAN style="color:#007F00">' flag yes/no opening Windows Explorer</SPAN><br><br><SPAN style="color:#00007F">Sub</SPAN> SelectSheets4Print()<br><SPAN style="color:#007F00">' call userform to select sheets for printing</SPAN><br> SheetsForPrinting.Show<br> <SPAN style="color:#00007F">If</SPAN> <SPAN style="color:#00007F">Not</SPAN> bCancel <SPAN style="color:#00007F">Then</SPAN><br> <SPAN style="color:#007F00">' open Windows Explorer in the directory</SPAN><br> Shell "explorer.exe " & ActiveWorkbook.Path, vbNormalFocus<br> <SPAN style="color:#00007F">Else</SPAN><br> MsgBox "Finished printing to pdf"<br> <SPAN style="color:#00007F">End</SPAN> <SPAN style="color:#00007F">If</SPAN><br><SPAN style="color:#00007F">End</SPAN> <SPAN style="color:#00007F">Sub</SPAN><br><br><SPAN style="color:#00007F">Sub</SPAN> PrintAsPDF(<SPAN style="color:#00007F">ByVal</SPAN> sWS2Print <SPAN style="color:#00007F">As</SPAN> <SPAN style="color:#00007F">String</SPAN>, <SPAN style="color:#00007F">ByVal</SPAN> sSaveName <SPAN style="color:#00007F">As</SPAN> <SPAN style="color:#00007F">String</SPAN>)<br><SPAN style="color:#007F00">' Print Macro</SPAN><br><SPAN style="color:#007F00">'</SPAN><br> <SPAN style="color:#007F00">'PDF export, do not open directly in Acrobat _<br> in case there are many hundreds printed</SPAN><br> <SPAN style="color:#00007F">On</SPAN> <SPAN style="color:#00007F">Error</SPAN> <SPAN style="color:#00007F">GoTo</SPAN> Err<br> <SPAN style="color:#007F00">' Errors are thrown if sheets are hidden or nothing to print _<br> (Hidden sheets should not show up in list)</SPAN><br> ActiveWorkbook.Sheets(sWS2Print).ExportAsFixedFormat _<br> Type:=xlTypePDF, _<br> Filename:=sSaveName, _<br> OpenAfterPublish:=<SPAN style="color:#00007F">False</SPAN><br> <SPAN style="color:#00007F">On</SPAN> <SPAN style="color:#00007F">Error</SPAN> <SPAN style="color:#00007F">GoTo</SPAN> 0<br> <SPAN style="color:#00007F">Exit</SPAN> <SPAN style="color:#00007F">Sub</SPAN><br>Err:<br> MsgBox "Error printing sheet " & sWS2Print<br> <SPAN style="color:#00007F">On</SPAN> <SPAN style="color:#00007F">Error</SPAN> <SPAN style="color:#00007F">GoTo</SPAN> 0<br><SPAN style="color:#00007F">End</SPAN> <SPAN style="color:#00007F">Sub</SPAN><br><br></FONT>
Lastly we need to put in the Add-in required code. What needs to happen is that when the workbook (an add-in is still a workbook) is opened by Excel (for an add-in that is when Excel starts up), it installs our menu item. And when it exits (upon closing excel or unloading the add-in by the user) the menu item disappears. In case Excel crashed, we don't want to install a second identical menu item, so we delete any existing one first.
To get this done we need to write the code to do this into the Workbook module.
For this you need to in the VBE double-click on 'WorkBook' under your workbook name. This will open its module. Here we can put code that runs on opening and on closing the workbook.
OK. So paste the following code in here:
<font face=Courier New><SPAN style="color:#007F00">'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''</SPAN><br><SPAN style="color:#007F00">'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''</SPAN><br><SPAN style="color:#007F00">' START ThisWorkbook Code Module</SPAN><br><SPAN style="color:#007F00">'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''</SPAN><br><SPAN style="color:#007F00">'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''</SPAN><br><SPAN style="color:#00007F">Option</SPAN> <SPAN style="color:#00007F">Explicit</SPAN><br><br><SPAN style="color:#00007F">Private</SPAN> <SPAN style="color:#00007F">Const</SPAN> C_TAG = "McSijpP2PDFAddIn" <SPAN style="color:#007F00">' C_TAG should be a string unique to this add-in.</SPAN><br><SPAN style="color:#00007F">Private</SPAN> <SPAN style="color:#00007F">Const</SPAN> C_TOOLS_MENU_ID <SPAN style="color:#00007F">As</SPAN> <SPAN style="color:#00007F">Long</SPAN> = 30007&<br><br><SPAN style="color:#00007F">Private</SPAN> <SPAN style="color:#00007F">Sub</SPAN> Workbook_Open()<br><SPAN style="color:#007F00">'''''''''''''''''''''''''''''''''''''''''''''''</SPAN><br><SPAN style="color:#007F00">' Workbook_Open</SPAN><br><SPAN style="color:#007F00">' Create a submenu on the Tools menu. The</SPAN><br><SPAN style="color:#007F00">' submenu has two controls on it.</SPAN><br><SPAN style="color:#007F00">'''''''''''''''''''''''''''''''''''''''''''''''</SPAN><br><SPAN style="color:#00007F">Dim</SPAN> ToolsMenu <SPAN style="color:#00007F">As</SPAN> Office.CommandBarControl<br><SPAN style="color:#00007F">Dim</SPAN> ToolsMenuItem <SPAN style="color:#00007F">As</SPAN> Office.CommandBarControl<br><SPAN style="color:#00007F">Dim</SPAN> ToolsMenuControl <SPAN style="color:#00007F">As</SPAN> Office.CommandBarControl<br><br><SPAN style="color:#007F00">' First delete any of our controls that</SPAN><br><SPAN style="color:#007F00">' may not have been properly deleted previously.</SPAN><br>DeleteControls<br><br><SPAN style="color:#007F00">' Get a reference to the Tools menu.</SPAN><br><SPAN style="color:#00007F">Set</SPAN> ToolsMenu = Application.CommandBars.FindControl(ID:=C_TOOLS_MENU_ID)<br><SPAN style="color:#00007F">If</SPAN> ToolsMenu <SPAN style="color:#00007F">Is</SPAN> <SPAN style="color:#00007F">Nothing</SPAN> <SPAN style="color:#00007F">Then</SPAN><br> MsgBox "Unable to access Tools menu.", vbOKOnly<br> <SPAN style="color:#00007F">Exit</SPAN> <SPAN style="color:#00007F">Sub</SPAN><br><SPAN style="color:#00007F">End</SPAN> <SPAN style="color:#00007F">If</SPAN><br><br><br><SPAN style="color:#007F00">' Create a item on the Tools menu.</SPAN><br><SPAN style="color:#00007F">Set</SPAN> ToolsMenuItem = ToolsMenu.Controls.Add(Type:=msoControlPopup, temporary:=True)<br><SPAN style="color:#00007F">If</SPAN> ToolsMenuItem <SPAN style="color:#00007F">Is</SPAN> <SPAN style="color:#00007F">Nothing</SPAN> <SPAN style="color:#00007F">Then</SPAN><br> MsgBox "Unable to add item to the Tools menu.", vbOKOnly<br> <SPAN style="color:#00007F">Exit</SPAN> <SPAN style="color:#00007F">Sub</SPAN><br><SPAN style="color:#00007F">End</SPAN> <SPAN style="color:#00007F">If</SPAN><br><br><SPAN style="color:#00007F">With</SPAN> ToolsMenuItem<br> .Caption = "&Print to PDF"<br> .BeginGroup = <SPAN style="color:#00007F">False</SPAN><br> .OnAction = "'" & ThisWorkbook.Name & "'!SelectSheets4Print"<br> .Tag = C_TAG<br><SPAN style="color:#00007F">End</SPAN> <SPAN style="color:#00007F">With</SPAN><br><br><SPAN style="color:#007F00">'''''''''''''''''''''''''''''''''''''''''''''''</SPAN><br><SPAN style="color:#007F00">'' Create the first control on the new item</SPAN><br><SPAN style="color:#007F00">'' in the Tools menu.</SPAN><br><SPAN style="color:#007F00">'''''''''''''''''''''''''''''''''''''''''''''''</SPAN><br><SPAN style="color:#007F00">'Set ToolsMenuControl = ToolsMenuItem.Controls.Add(Type:=msoControlButton, temporary:=True)</SPAN><br><SPAN style="color:#007F00">'If ToolsMenuControl Is Nothing Then</SPAN><br><SPAN style="color:#007F00">' MsgBox "Unable to add item to Tools menu item.", vbOKOnly</SPAN><br><SPAN style="color:#007F00">' Exit Sub</SPAN><br><SPAN style="color:#007F00">'End If</SPAN><br><SPAN style="color:#007F00">'</SPAN><br><SPAN style="color:#007F00">'With ToolsMenuControl</SPAN><br><SPAN style="color:#007F00">' ''''''''''''''''''''''''''''''''''''</SPAN><br><SPAN style="color:#007F00">' ' Set the display caption and the</SPAN><br><SPAN style="color:#007F00">' ' procedure to run when clicked.</SPAN><br><SPAN style="color:#007F00">' ''''''''''''''''''''''''''''''''''''</SPAN><br><SPAN style="color:#007F00">' .Caption = "&Click Me One"</SPAN><br><SPAN style="color:#007F00">' .OnAction = "'" & ThisWorkbook.Name & "'!MacroToRunOne"</SPAN><br><SPAN style="color:#007F00">' .Tag = C_TAG</SPAN><br><SPAN style="color:#007F00">'End With</SPAN><br><SPAN style="color:#007F00">'</SPAN><br><SPAN style="color:#007F00">'''''''''''''''''''''''''''''''''''''''''''''''</SPAN><br><SPAN style="color:#007F00">'' Create the first control on the new item</SPAN><br><SPAN style="color:#007F00">'' in the Tools menu.</SPAN><br><SPAN style="color:#007F00">'''''''''''''''''''''''''''''''''''''''''''''''</SPAN><br><SPAN style="color:#007F00">'Set ToolsMenuControl = ToolsMenuItem.Controls.Add(Type:=msoControlButton, temporary:=True)</SPAN><br><SPAN style="color:#007F00">'If ToolsMenuControl Is Nothing Then</SPAN><br><SPAN style="color:#007F00">' MsgBox "Unable to add item to Tools menu item.", vbOKOnly</SPAN><br><SPAN style="color:#007F00">' Exit Sub</SPAN><br><SPAN style="color:#007F00">'End If</SPAN><br><SPAN style="color:#007F00">'</SPAN><br><SPAN style="color:#007F00">'With ToolsMenuControl</SPAN><br><SPAN style="color:#007F00">' ''''''''''''''''''''''''''''''''''''</SPAN><br><SPAN style="color:#007F00">' ' Set the display caption and the</SPAN><br><SPAN style="color:#007F00">' ' procedure to run when clicked.</SPAN><br><SPAN style="color:#007F00">' ''''''''''''''''''''''''''''''''''''</SPAN><br><SPAN style="color:#007F00">' .Caption = "&Click Me Two"</SPAN><br><SPAN style="color:#007F00">' .OnAction = "'" & ThisWorkbook.Name & "'!MacroToRunTwo"</SPAN><br><SPAN style="color:#007F00">' .Tag = C_TAG</SPAN><br><SPAN style="color:#007F00">'End With</SPAN><br><br><SPAN style="color:#00007F">End</SPAN> <SPAN style="color:#00007F">Sub</SPAN><br><br><br><SPAN style="color:#00007F">Private</SPAN> <SPAN style="color:#00007F">Sub</SPAN> Workbook_BeforeClose(Cancel <SPAN style="color:#00007F">As</SPAN> <SPAN style="color:#00007F">Boolean</SPAN>)<br><SPAN style="color:#007F00">''''''''''''''''''''''''''''''''''''''''''''''''''''</SPAN><br><SPAN style="color:#007F00">' Workbook_BeforeClose</SPAN><br><SPAN style="color:#007F00">' Before closing the add-in, clean up our controls.</SPAN><br><SPAN style="color:#007F00">''''''''''''''''''''''''''''''''''''''''''''''''''''</SPAN><br> DeleteControls<br><SPAN style="color:#00007F">End</SPAN> <SPAN style="color:#00007F">Sub</SPAN><br><br><br><SPAN style="color:#00007F">Private</SPAN> <SPAN style="color:#00007F">Sub</SPAN> DeleteControls()<br><SPAN style="color:#007F00">''''''''''''''''''''''''''''''''''''</SPAN><br><SPAN style="color:#007F00">' Delete controls whose Tag is</SPAN><br><SPAN style="color:#007F00">' equal to C_TAG.</SPAN><br><SPAN style="color:#007F00">''''''''''''''''''''''''''''''''''''</SPAN><br><SPAN style="color:#00007F">Dim</SPAN> Ctrl <SPAN style="color:#00007F">As</SPAN> Office.CommandBarControl<br><br><SPAN style="color:#007F00">'On Error Resume Next</SPAN><br><SPAN style="color:#00007F">Set</SPAN> Ctrl = Application.CommandBars.FindControl(Tag:=C_TAG)<br><br><SPAN style="color:#00007F">Do</SPAN> <SPAN style="color:#00007F">Until</SPAN> Ctrl <SPAN style="color:#00007F">Is</SPAN> <SPAN style="color:#00007F">Nothing</SPAN><br> Ctrl.Delete<br> <SPAN style="color:#00007F">Set</SPAN> Ctrl = Application.CommandBars.FindControl(Tag:=C_TAG)<br><SPAN style="color:#00007F">Loop</SPAN><br><br>End <SPAN style="color:#00007F">Sub</SPAN><br><br><SPAN style="color:#007F00">'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''</SPAN><br><SPAN style="color:#007F00">'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''</SPAN><br><SPAN style="color:#007F00">' END ThisWorkbook Code Module</SPAN><br><SPAN style="color:#007F00">'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''</SPAN><br><SPAN style="color:#007F00">'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''</SPAN><br><br><br><br></FONT>
Save your workbook.
In the VBE, go to the workbook module (the one we just created), click once in the WorkBook_Open macro and press F5 key.
Go back to Excel, and check, you should have a Add-In tab in the menu and if you go there there should be a menu item we just created.
Open another workbook. Go to this menu item and click it. It should work and print your sheets if you ask.
So once it is tested OK, then go back to the Print2PDF workbook. We want to put some comments in the file Properties so we know what this add-in does:
Go to the File menu, Info. On the right panel you see the properties. Expand the list by clicking on 'Show All Properties'
Click on 'Add a Category' and type 'Utility'
Click on 'addComments' and type in 'This add-in makes it easy to print selected sheets to .pdf files'
Click on 'add Title' and give it a title as well.
Now save as Add-In (.xlam for 2007+, .xla if you still use an older version of Excel)
Excel will propose to save it in its Add-in directory, which probably is fine.
Now close Print2PDF.
Install the Add-in:
go to the File tab, Options, Add-Ins, and press the Go... button bottom middle. Now you see a list of installed (with tick) and not installed add-ins. Put a tick infront of the PrintSheets2PDF (you can now see your comments here) and OK.
The add-in will load and you now have the extra menu available everytime you start Excel.
wonderful or what?
So you don't want to go through all this work yourself? Well download the add-in here, put it in your add-in folder (or any other folder that won't move about) and go through the last steps to install it.
here is the link. The file is unprotected so you can check / modify the code if you want.
Printto PDF Add-in:
https://drive.google.com/file/d/0BxykuY6uKAJ9LXZBUGxIQTJNV00/edit?usp=sharing