msoutlook.org Forum Index
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister   ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Will not send

 
Post new topic   Reply to topic    msoutlook.org Forum Index -> Outlook Fax
Author Message
Robert



Joined: 27 Oct 2007
Posts: 1

PostPosted: Sat Oct 27, 2007 9:08 pm    Post subject: Will not send Reply with quote

I am using the following code with WinXP-Pro, and Visual Basic 6.0 SP5

The code works fine until the noted line
I have Outlook 2003 installed.

this function will attach my PDF file to the fax

Public Function SendFaxMessage(Optional AttachmentPath)
'Send the fax via Outlook.

Dim olookApp As Outlook.Application
Dim olookMsg As Outlook.MailItem
Dim olookRecipient As Outlook.Recipient
Dim olookAttach As Outlook.Attachment

' create the Outlook session.
Set olookApp = CreateObject("Outlook.Application")

' create the message.
Set olookMsg = olookApp.CreateItem(olMailItem)

With olookMsg
' add the To recipient(s) to the message.
Set olookRecipient = .Recipients.Add(frmCalls.txtCalls(3).Text & "@w"
& frmCalls.lblFaxNo.Caption) 'Get name and Fax no.
olookRecipient.Type = olTo

' add the CC recipient(s) to the message.
' Set olookRecipient = .Recipients.Add("") 'Name deleted.
' olookRecipient.Type = olCC

' set the Subject, Body, and Importance of the message.
.Subject = frmCalls.txtCalls(4).Text
.Body = "The fax is attached as a .pdf"
.Importance = olImportanceHigh 'High importance

' add attachments to the message.
If Not IsMissing(AttachmentPath) Then
Set olookAttach = .Attachments.Add(AttachmentPath)
End If

' resolve each Recipient's name
For Each olookRecipient In .Recipients
olookRecipient.Resolve
If Not olookRecipient.Resolve Then
olookMsg.Display ' display any names that can't be resolved
End If
Next
.Send 'This is where the error occurs.
End With

Set olookMsg = Nothing
Set olookApp = Nothing

End Function

--
Thanks in advance
bob
robert11@mountaincable.net

Archived from group: microsoft>public>outlook>fax
Back to top
View user's profile Send private message
Russ Valentine [MVP-Outlo



Joined: 12 Aug 2007
Posts: 558

PostPosted: Sat Oct 27, 2007 10:27 pm    Post subject: Re: Will not send Reply with quote

You need to post in a programming group.

--
Russ Valentine
[MVP-Outlook]
"Robert" wrote in message
news:%23wGl91NGIHA.748@TK2MSFTNGP04.phx.gbl...
>I am using the following code with WinXP-Pro, and Visual Basic 6.0 SP5
>
> The code works fine until the noted line
> I have Outlook 2003 installed.
>
> this function will attach my PDF file to the fax
>
> Public Function SendFaxMessage(Optional AttachmentPath)
> 'Send the fax via Outlook.
>
> Dim olookApp As Outlook.Application
> Dim olookMsg As Outlook.MailItem
> Dim olookRecipient As Outlook.Recipient
> Dim olookAttach As Outlook.Attachment
>
> ' create the Outlook session.
> Set olookApp = CreateObject("Outlook.Application")
>
> ' create the message.
> Set olookMsg = olookApp.CreateItem(olMailItem)
>
> With olookMsg
> ' add the To recipient(s) to the message.
> Set olookRecipient = .Recipients.Add(frmCalls.txtCalls(3).Text & "@w"
> & frmCalls.lblFaxNo.Caption) 'Get name and Fax no.
> olookRecipient.Type = olTo
>
> ' add the CC recipient(s) to the message.
> ' Set olookRecipient = .Recipients.Add("") 'Name deleted.
> ' olookRecipient.Type = olCC
>
> ' set the Subject, Body, and Importance of the message.
> .Subject = frmCalls.txtCalls(4).Text
> .Body = "The fax is attached as a .pdf"
> .Importance = olImportanceHigh 'High importance
>
> ' add attachments to the message.
> If Not IsMissing(AttachmentPath) Then
> Set olookAttach = .Attachments.Add(AttachmentPath)
> End If
>
> ' resolve each Recipient's name
> For Each olookRecipient In .Recipients
> olookRecipient.Resolve
> If Not olookRecipient.Resolve Then
> olookMsg.Display ' display any names that can't be resolved
> End If
> Next
> .Send 'This is where the error occurs.
> End With
>
> Set olookMsg = Nothing
> Set olookApp = Nothing
>
> End Function
>
> --
> Thanks in advance
> bob
> robert11@mountaincable.net
>

Back to top
View user's profile Send private message
Display posts from previous:   
Related Topics:
how do I send a fax? I do not use Outlook. I have a One Touch Visioneer scanner connected, but it's email button only is configured to access MSN or Outlook and I don't know how to change that. I use Juno for email. When I use the faxwizard, I don't know where stuff goes b

not able to send mail hai, I am unable to send across mails from my outlook expect our mail accounts. could u please guide me. the error message is "The message could not be sent because one of the recipients was rejected by the server. The rejected e-mail address was 'jegadee

How can I send a Fax from XP question... Here is what I want to do: Send a fax directly from Outlook to a FAX machine via the Internet (i.e. without redialing). I have XP pro or something and I have successfully set up the MS fax program...but I want to use my existing connection to the Internet

How to send FAX using Word 2007 I have just installed Office 2007 and the only option it gives me for sending a fax is by using an Internet FAX service. Is there away to send a FAX from the Windoze FAX console using Office 2007? HELP!!! CDavey

send fax from outlook to faxmaker Hello! (first sorry for my english!!!) I have this problem: I have one fax server with GFI FaxMaker for network/SMTP 11 on W2k and one mail server with Alt-N M-daemon. I using faxmaker email gateway. When i send a fax from outlook (corpore) to a business
Post new topic   Reply to topic    msoutlook.org Forum Index -> Outlook Fax All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group