Link to home
Start Free TrialLog in
Avatar of mikef17
mikef17

asked on

Send Fax and EMail after Mail merge

How can i automatically send Send Fax and EMail after Mail merge?

My program will produce mail merge in
Word(data source is Access97).It will be letter for clients.After that i want send fax or EMail:anyone of clients will get only his letter.
Avatar of LJG
LJG

Mike

A)  If you are interested in code to send a word document by e-mail as an attachment, or send a word document through WinFax I can help you out.  You could use Word mail merge to send 1 doucment, save to disk, then fax/email.  Then mail merge document #2, fax/email.

B) However this does not seem efficient.  What you probably want is
    1) Code to loop through Name and Fax/e-mail numbers/addresses.
    2) Code that will open Word, and through automation do mail merge
    3) Code that works in word to Fax/e-mail with the address from # 1 above.
    4) Report back to access a success or failure or each address.


If what you want to do is -B- I'm sure some one has done it.  If what you are looking for is something like -A- I be willing to give you some code.

Thanks
LJG  
Avatar of mikef17

ASKER

Hi,LJG!

I look for "B" option.I ,also, am sure some one has done it.But who is it ...?
Mike
Just a thought - as it is my humble opinion.

What you are asking for is almost a complete application.  If it's out there on the web, someone might be able to help.

However if someone has done it, you are talking about them posting lots of code.  You >>might<< be better off with seperate questions.

In the wo
1) How do you fax/e-mail a word mail merge documents.  To fax you will most likely need to know what Fax program you want to use.  You might want to look at:
https://www.experts-exchange.com/Computers/Applications/MS_Office/

2) Once you figure out how to do it from word, ask a question in this form about how to do automation.  Once you learn how to write the code in word, automation from Access will be easy.

Just a thought.

Good Luck
LJG





which fax software are you using?
Avatar of mikef17

ASKER

I use microsoft fax.
I know you can pull Microsoft Fax off the Windows 95 & Windows 98 CD, but it is not installed as a standard install.  Microsoft included WinFax with Outlook 98 and foward and indicated they were not supporting MS Fax.

I think you might want to look at another fax software that is going to be supported by the manufactuer.  I like WinFax on a single machine and if you don't want a modem on each machine, Net Satisfaxtion on the network.  However there are hundreds of fax programs on the market, in fact I believe there are some shareware fax programs.  The important thing is that whatever program you pick you can use it to send fax inside VBA.  With WinFax you can use automation and have almost complete control.

Just my humble opinion.
LJG
I should of added - the Winfax that comes with Outlook, you can >>not<< do automation with.  You need the full version (about $100)
Hi,
I agree with LJG,
WinFax has SDK (see CA web site for downloading documentation, SDK and samples) that provides full automation features, so you can send faxes from within Access using VBA.
Dedushka
Just for example of using WinFax CSDKSend see following code behind of cmdPrintToWinFax button on one of my forms:
---------
Private Sub cmdPrintToWinFax_Click()

If Me.edtName <> "" And Me.edtPhoneNumber <> "" Then
   
    ' send the fax
    Set sendObj = CreateObject("WinFax.SDKSend8.0")
   
    SetSendOptions
   
    ' Add a recipient
    sendObj.SetCompany (Nz(edtCompany))
    sendObj.SetTo (Nz(edtName))
    sendObj.SetAreaCode (Nz(edtAreaCode))
    sendObj.SetCountryCode (Nz(edtCtryCode))
    sendObj.SetDialPrefix (Nz(edtDialPrefix))
    sendObj.SetNumber (Nz(edtPhoneNumber))
    'sendObj.SetExtension (Nz(edtExtension))
   
    If chkOnHold.Value = True Then
      sendObj.SetHold (Abs(chkOnHold.Value))
    ElseIf chkOffPeak.Value = True Then
      sendObj.SetOffPeak (Abs(chkOffPeak.Value))
    ElseIf chkSendOn.Value = True Then
      sendObj.SetTime (edtTime)
      sendObj.SetDate (edtDate)
    End If

    If sendObj.AddRecipient() = 1 Then
      MsgBox "The Recipient couldn't be added.", vbExclamation
      Exit Sub
    Else
      If chkLeaveRunning = True Then sendObj.LeaveRunning

      If strReportName = "" Then
        sendObj.Send (0)
      Else
        sendObj.SetPrintFromApp (1)
        sendObj.Send (0)
     
        ' okay, lets print
        subPrintToFax strReportName
        MsgBox "Click OK here once you have finished printing report to WinFax.", vbInformation
      End If
     
      sendObj.Done
      Set sendObj = Nothing
      DoCmd.Close acForm, Me.Name
    End If
  Else
    MsgBox "Please fill in Name and Fax Number!", vbCritical
  End If

End Sub
----------
HTH,
Dedushka
Avatar of mikef17

ASKER

LJG thank you for tip !I probably will use WinFax in my application.
anybody can give me step by step plan of work with WinFax?

Thanks in advance!
ASKER CERTIFIED SOLUTION
Avatar of LJG
LJG

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of mikef17

ASKER

LJG
I've tried your code and get run-time error 2282:the formats that enable you to output data are missing from from the windows registry.

Mike
Mike
My thought would be that you don’t have a >>full version<< or WinFax Pro 8.03 or higher installed.  

If the above is not the problem, let me know what form you are using and what line the code that the program stops and gives you the error.

Also make sure the code is compiled.

Let me know
LJG
Avatar of Eric - Netminder
Mike --

Instead of making promises you can't keep (https://www.experts-exchange.com/jsp/qShow.jsp?ta=msaccess&qid=11082385 ), how about giving one of these folks the points for giving you the answer....

Avatar of mikef17

ASKER

This question has a deletion request Pending
Mike
I was curious.  Is it that you went on to another project, you can't get your hands on a full version of WinFax, or the code stopped a a particular line.

LJG
Avatar of mikef17

ASKER

Hello LJG!
I've looked for "complite solution" of that problem (some module of VB code).Now i see that problem is more complicated than i thinked.
Thank you for example and for your help!


For ericpete:
i don't got answer that i loofed for, because that and only because that this question was't marked as answer


Mike
Unfortunately, mikef17, sometimes the correct answer is "it cannot be done", or "this is the only way to accomplish it" or others like that.  The sadness here, is that many people came to your aid and provided viable input ... yet you choose to delete.  That's not what I, as a person also looking for similar solutions, and helping for "free" would call a fair play in the rules of engagement.

Off to ponder.

Asta
Avatar of mikef17

ASKER

This question has a deletion request Pending
Restoring question.

darinw
Community Support
Hello everyone,

>i don't got answer that i loofed for, because that and only because that this question was't marked as answer

I am not sure I understand your statement here. Are you saying that you'd like to award points but haven't because no 'answer' was proposed?

You can click on the Accept Comment as Answer button that is in the HEADER of the appropriate comment to award points.

darinw
Community Support
And, on another issue...

Experts Exchange can help you accomplish a great deal at no cost to yourself. However, using the site instead of hiring a consultant to get work done has its limits. Generally speaking, asking for a completed and complex application with business rules involved is probably outside of the scope of the site.

In other words, if the project is such that you have considered, or should have considered, hiring a programmer or consultant to get it done, then it probably is not something that should be posted at the site. I'd say that when you are thinking in terms of 'paying' points to have a finished product, you are not using the site as intended.

Please review the Help Desk pages (link at the bottom of every page) for what we (Experts Exchange) consider a Question and Answer:

"What is a question and answer?"

A question is one specific inquiry that elicits a specific response. An answer is one specific solution to a specific inquiry. To learn more about what EE's Experts and network members expect from each other in asking and answering questions, visit our pages on Question and Answer tips and Community Guidelines.

darinw
Community Support
Thank you very much, Darin, for posting some clarify; it is needed.

Although I am not a participant in this question with any desire for points, the issue is important and I appreciate your help; and feel confident that mikef17 will appreciate it as well.

Asta
Oops, can't type, meant clarity.  Apologies for too many thumbs on the keyboard.  ;0)
mikef17 - Shall I award points to Expert LJG for you?

darinw
Community Support
Experts, are there any objections to me awarding points to Expert LJG?

darinw
Community Support
fine by me
Points awarded to LJG.

amp
Community Support Moderator
Experts Exchange