Opening link and saving as pdf

lizemi

New Member
Joined
Sep 5, 2021
Messages
25
Office Version
  1. 365
Platform
  1. Windows
Hi
I have our gl recons as picture uploaded
I have the following code that
1 - allows the manger to insert a picture of there signature (this works 100%)
2- creates a pdf of the "signed" gl recon that saves to our sharepoint.

What I would like to add to the macro as step 1 is for the link to the document in cell b51 to open so the manager can view it and then sign
the link should be the consecutive pages to the pdf document saved on the sharepoint ie page 1 of the pdf document should be the active sheet pg2 onwards the document in the link
this will result in one pdf file combining the active sheet and the document in the link

Screenshot 2023-10-09 092523.png

Sub Sign()
If InputBox("Enter Provided Pin #") = 1234 Then


Range("e61").Select 'Select cell where the signature is going.
attachFile = Application.GetOpenFilename(FileFilter:="Picture Files (*.jpg;*.bmp;*.png), *.jpg;*.bmp;*.png", Title:="Select Signature File") 'Prompt to upload the signature file.
If attachFile = False Then Exit Sub 'If no file uploaded exit the subroutine.
Set signimage = ActiveSheet.Pictures.Insert(attachFile) 'Attach image
With signimage
'Resize Picture to fit in the range....
.Width = 55
.Height = 55



End With
End If

Dim wPath As String, wFile As String

wPath = "https://sharepintadress"
wFile = Range("d3").Value & ".pdf"

ActiveSheet.ExportAsFixedFormat Type:=xlTypePDF, Filename:=wPath & wFile, _
Quality:=xlQualityStandard, IncludeDocProperties:=True, _
IgnorePrintAreas:=False, OpenAfterPublish:=False


End Sub
 

Excel Facts

How can you automate Excel?
Press Alt+F11 from Windows Excel to open the Visual Basic for Applications (VBA) editor.

Forum statistics

Threads
1,215,069
Messages
6,122,959
Members
449,096
Latest member
Anshu121

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top