We run a Mac environment and I have created a VBA to convert a worksheet to pdf and then send to email however I keep getting 2 errors, one being a print error the other a run-time error 1004. The VBA program is as follows:-
Sub AttachActiveSheetPDF()
Dim IsCreated As Boolean
Dim i As Long
Dim PdfFile As String, Title As String
Dim MailApp As Object
Dim SendTo As String
' Not sure for what the Title is
Title = "PORegister"
' Define PDF filename
PdfFile = [login to view URL]
i = InStrRev(PdfFile, ".")
If i > 1 Then PdfFile = Left(PdfFile, i - 1)
PdfFile = PdfFile & "_" & [login to view URL] & ".pdf"
[login to view URL] Type:=xlTypePDF, Filename:="ICS Australia \ pdfFile", Quality:=xlQualityStandard, IncludeDocProperties:=True, IgnorePrintAreas:=False, OpenAfterPublish:=False
' Use already open Mail if possible
On Error Resume Next
'Set MailApp = GetObject(, "[login to view URL]")
'If Err Then
Set MailApp = CreateObject("[login to view URL]")
IsCreated = True
'End If
'[login to view URL] = True
On Error GoTo 0
SendTo = [login to view URL]("D9").Value
' Prepare e-mail with PDF attachment
With [login to view URL](0)
' Prepare e-mail
.Subject = "Purchase Order"
.To = SendTo
.CC = "accounts@[login to view URL]"
.Body = "Hi," & vbLf & vbLf _
& "The report is attached in PDF format." & vbLf & vbLf _
& "Regards," & vbLf _
& [login to view URL] & vbLf & vbLf
.[login to view URL] PdfFile
' Try to send
On Error Resume Next
.Display
[login to view URL] = True
If Err Then
MsgBox "E-mail was not sent", vbExclamation
End If
On Error GoTo 0
End With
' Quit Mail if it was created by this code
'If IsCreated Then [login to view URL]
' Release the memory of object variable
Set MailApp = Nothing
End Sub
Hello, sir!
(First Bidder to offer this) I hope I will be awarded from you.
************I agree for any price you will set ** You can test me over chat before you award me!
give it a try over chat before you award me! .. you will be %100 satisfied
I saw your project and I would like to work on it . I am available 24 hours a day and I have fast response, I will be always there to fulfill your requirement. I always offer low cost and good perfect quality (Just try and see by yourself), I will make you get 100% satisfaction with the best quality service. I will be very happy to work with you, and I hope you too.
Thank you
$20 AUD in 1 giorno
4,7 (5 valutazioni)
2,2
2,2
3 freelance hanno fatto un'offerta media di $40 AUD
Greetings sir, i am an expert freelancer for this job and your 100% satisfaction is assured if you allow me to serve.
Here is the reason. Why you should pick me?
a) I am a very expert and have the same kind of experience of 5 years.
b) I work very hard (16+ hours a day and 7 days a week) and also very fast so... it will be done very soon than most of the other providers
c) And most important part is my policy:
"I will give you (to my client) life time support (as long as you keep relation with me). And fix any bugs/problem without any cost. So, don't ever worry about me”
Please sir, leave a reply ASAP, as I am waiting for your kind reply
I am programmer and graphic designer with over 5 years experience. My field of expertise is WebForms c#, MS SQL, WPF, WebServices, HTML, CSS, Web Hosting, domain registration and management. I have knowledge about jQuery and javaScript.