Hi,
Posted question before, didn't get reply.
I've got a save as pdf button, but when the button is pressed I want certain text not to show on the saved pdf that is to be sent. With the code bellow I get an error. I've got two sheets in my final pdf file : "Samlet", and "Lager uttak"
Sub RDB_Sheet_Level_Names_To_PDF_And_Create_Mail()
Dim FileName As String
FileName = Create_PDF_Sheet_Level_Names("addtopdf", "", True, False)
Sheets("Samlet").Range("C16:H17,G32:G33 ").Font.ColorIndex = vbWhite
If FileName <> "" Then
RDB_Mail_PDF_Outlook FileName, "", "Emnet går her", _
"Se vedlegg" _
& vbNewLine & vbNewLine & "Mvh. ", False
Else
MsgBox "Not possible to create the PDF, possible reasons:" & vbNewLine & _
"Microsoft Add-in is not installed" & vbNewLine & _
"You Canceled the GetSaveAsFilename dialog" & vbNewLine & _
"The path to Save the file in arg 2 is not correct" & vbNewLine & _
"You didn't want to overwrite the existing PDF if it exist"
End If
End Sub
Bookmarks