-
Email and possibly a Fax with Word [Resolved]
In automating word, I tried to send a document to wdSendToFax, except that instead of sending thru my modem based fax program, it errorred out, saying that Microsoft Fax wasn't installed. I googled, and found that this hasn't been supported since W98. Is there an easy way to get Word to use the fax for the merge documents?
I think I could use a common dialog to select the printer, but I was hoping that there was an easier way.
I also tried to use wdSendToEmail, but need a valid email address, and need to know how to supply the infor below. I have an EMAIL field in the table. how do I use it?
Thanks
http://www.vbforums.com/attachment.p...chmentid=34127
-
Re: Fax Question and Email with Word
I'll see what i can dig up. I think I can get into the dialog and preset it with the info, but not 100% sure.
I can do that on other dialogs so I think I can. Be back.
-
Re: Fax Question and Email with Word
any luck? I don't want to use a printer dialog, unless there is no other way
-
Re: Fax Question and Email with Word
Havent had too much time today. Allot of Mod things to do today.
I will try though.
Did you want me to show you how to do the img tag?
-
Re: Fax Question and Email with Word
do you see it twice? I only see it once. I tried to upload it, and didn't see it, so I loaded the img tag version. Noteme told me he see's two of them.
-
Re: Fax Question and Email with Word
Yes, its duplicated. I had shown in a thread during the upgrade how to use it
but I dont have the time to search.
It all depends on the number of picture attachments you have on that
thread. If you have only one then it will be automatically displayed in a frame
visible to the viewer. If you have two or more pictures the frame will not
display the image automatically. So thats when you can use the img tags.
I took out the img tag so it will only show once now. I hope thats ok with you.
-
Re: Fax Question and Email with Word
except that I can't see it now. it's ok.
hmm. i switched back to IE and it is still gone.
what is going on?
-
Re: Fax Question and Email with Word
I can see it and I am using IE 6. It must be a FF issue? Ask Not Me to look at it and see if he can see it.
-
Re: Fax Question and Email with Word
I was just talking with Not Me and he thinks its all the popup blockers that you use.
-
Re: Email and possibly a Fax Question with Word
It's not. Last night I couldn't delete my own threads. Today I can.
Have you found anything for this problem?
-
Re: Email and possibly a Fax Question with Word
Not yet. I have to set up a MM and some demo code in order to test. So when I get enough time I will.
Ps, how come you deleted those posts?
-
Re: Email and possibly a Fax Question with Word
They had little to do with the thread. I tried to delete them last night, but couldn't. I also didn't want to spam the thread trying to get your attention.
I would ike to figure it out. If you know of any links that might help, I'd be wiilling to do some of the legwork. I found the sql string yesterday, but was stuck on the Microsoft Fax. I didn't try to find anything about email.
I appreciate your effort.
-
Re: Email and possibly a Fax Question with Word
Oh, ok. The best way to get my attention is with $$$ :D Just kidding.
Send me a PM instead. I am usually on-line most of the day/night as your aware. :lol:
-
Re: Email and possibly a Fax Question with Word
I did send you a PM last night, right before I posted the last time.
-
Re: Email and possibly a Fax Question with Word
I got it in the morning. I went to bed around that time.
I couldn't find that particular dialog window, but these should help.
Let me know.
VB Code:
Dim oDlg As Word.Dialog
Set oDlg = Dialogs(wdDialogMailMergeUseAddressBook)
oDlg.Show
Set oDlg = Dialogs(wdDialogMailMergeRecipients)
oDlg.Show
Set oDlg = Dialogs(wdDialogMailMerge)
oDlg.Show
-
Re: Email and possibly a Fax Question with Word
I just used the SendtoEmail, after having problems with the SendtoFax
Sending it the printer or a new document work fine. I'd like to be able to fax it, but may have to open a printer dialog, and wonder if it will send to the numbers in the table. For the email, it should send the first few records to the same email address, and then send them again to the next. The records are prepared that way. Grouped by email address.
VB Code:
With oDoc.MailMerge
' .Destination = wdSendToPrinter 'wdSendToNewDocument;wdSendToPrinter; wdSendToFax; wdSendToEmail
' .Destination = wdSendToNewDocument 'wdSendToNewDocument;wdSendToPrinter; wdSendToFax; wdSendToEmail
.Destination = wdSendToEmail
.Execute True
' moApp.Documents(1).Close False
End With
I didn't understand what you mean about how I got it. I hope you meant this.
-
Re: Email and possibly a Fax Question with Word
This doesn't work. I tried all three. Active document not open error.
How would I use it? Before, that screen popped up in Word on its own. I wanted to fill in the email addresses.
Here is what I tried:
VB Code:
With oDoc.MailMerge.DataSource
.FirstRecord = 1
.LastRecord = .RecordCount
End With
With oDoc.MailMerge
If OptPrinter.Value = True Then
' .Destination = wdSendToPrinter 'wdSendToNewDocument;wdSendToPrinter; wdSendToFax; wdSendToEmail
.Destination = wdSendToNewDocument 'wdSendToNewDocument;wdSendToPrinter; wdSendToFax; wdSendToEmail
ElseIf optFax.Value = True Then
.Destination = wdSendToFax
ElseIf optEmail.Value = True Then
.Destination = wdSendToEmail
End If
' Dim oDlg As Word.Dialog
' Set oDlg = Dialogs(wdDialogMailMergeUseAddressBook)
' oDlg.Show
' Set oDlg = Dialogs(wdDialogMailMergeRecipients)
' oDlg.Show
' Set oDlg = Dialogs(wdDialogMailMerge)
' oDlg.Show
.Execute True
' moApp.Documents(1).Close False
End With
-
Re: Email and possibly a Fax Question with Word
But in the PM I sent you, you never let me know how you got to that dialog window
so I could get its object name for possible fill in.
-
Re: Email and possibly a Fax Question with Word
sorry. I posted it here, it popped up in word when I selected sendtoemail from the options above. I have the code that i've been trying above.
I have an option button for fax, email, and printer.
-
Re: Email and possibly a Fax Question with Word
What version of Word are you using. I got one dialog similar but not the same.
-
Re: Email and possibly a Fax Question with Word
Word XP (I guess that it's 2002 ? )
-
Re: Email and possibly a Fax Question with Word
Ok, there is no properties for prepopulating that dialog in 2003, but there is a way to include to
the reciepient in a filed in your recordsource. So if you add a field with the email addresses
then we can specify to use that feild as the receipient. Also, you can create a separate
address book and designate that as the listing too.
-
Re: Email and possibly a Fax Question with Word
I have a field already that has the email address.
I also have a subject, and want to send html letters.
(still spreading points, btw)
-
Re: Email and possibly a Fax Question with Word
The field is Email, and is already in the recordset. There are multiple records to each emall address, but we can send out multiple emails.
-
Re: Email and possibly a Fax Question with Word
Ok, found the proper way to do this.
VB Code:
Dim oDoc As Word.Document
Set oDoc = ActiveDocument
With oDoc.MailMerge.DataSource
.FirstRecord = 1
.LastRecord = .RecordCount
End With
With oDoc.MailMerge
'If OptPrinter.Value = True Then
'.Destination = wdSendToNewDocument 'wdSendToNewDocument;wdSendToPrinter; wdSendToFax; wdSendToEmail
'ElseIf optFax.Value = True Then
'.Destination = wdSendToFax
'ElseIf optEmail.Value = True Then
.Destination = wdSendToEmail
.MailSubject = "RobDog888 VB/Word Guruâ„¢"
.MailAddressFieldName = "FieldThatContainsTheEmailAddresses"
.MailAsAttachment = False
.MailFormat = wdMailFormatHTML
.Execute
'End If
End With
-
Re: Email and possibly a Fax Question with Word
Great. I'll try that in a minute. Working on a sample for someone else.
The only problem is the message that pops up for each message. Is there any easy way around it? I took about 10 minutes to go through 35 records.
Or maybe could just combine records?
Anything about the fax problem there?
-
Re: Email and possibly a Fax Question with Word
This should work, but it depends on how your recordset is setup :ehh:.
Now the .Execute wil execute it without showing it to the user. The .Show
will show it, in case that is an option you need.
-
Re: Email and possibly a Fax Question with Word
I added to the last post before I saw your comment. Sorry. I'll start making new threads instead of editing the old ones.
-
Re: Email and possibly a Fax Question with Word
-
Re: Email and possibly a Fax Question with Word
That doesn't look good about sending faxes. Who has Symantec anyways? Plus it said somewhere else that it didn't work for mailmerge if you had Symantec installed. I think it only gets installed if you have Exchange server, and no email.
I'll just leave an option to keep the merge in Word, and save it if you want, or fax the pages one at a time (or in groups) Maybe I'll include a page that contains all of the fax numbers. That would help.
I guess it isn't possible to automate the faxing of mailmerges.
How about the SP2 issues? Can't I have the message pop up once? It pops up for each record during the mergetoemail. That seem like overkill, to me.
I know there is a way to get around it, but haven't read anything about it.
Is there a way to programmatically set up for clients?
-
Re: Email and possibly a Fax Question with Word
In one of the kb's it states "Microsoft Windows 2000 fax program".
So I assume that if you have something like WinFax it would work?
With XP SP-2 isnt there something to tell it to allow access for certain
programs? I havent looked into SP-2 features/fixes/security but ???
Quote:
Originally Posted by dglienna
Is there a way to programmatically set up for clients?
How do you mean.
-
Re: Email and possibly a Fax Question with Word
I allowed an exception for VB in the firewall, but it had nothing to do with Outlook. I still got the message stating that a virus may be trying to send email, for each record that it sent. I just thought that there would be a way around that, which wouldn't require the client to have to make any changes.
If I opened Outlook, would it still generate the message? Could you show me how to create an instance of Outlook? Just load a reference, and use createobject() something or other?
-
Re: Email and possibly a Fax Question with Word
Any programmatic access to Outlook will generate the Outlook Security Warning message.
Usually to get around it you would use SMTP instead. But then the MM probably would
not use it since it uses MAPI by default. :(
I dont think you an change it. You may end up having to create the whole
thing manually for it to use SMTP.
-
Re: Email and possibly a Fax Question with Word
I don't think that would be practical. I'd have to set up the smtp and pop info for each client, whereby it is automaitc with mapi. I will let you know if I want to undertake something like that, but I'm thinking that I don't want to.
-
Re: Email and possibly a Fax Question with Word
Me neither! :D
You could say to your clients that its because of Office's security features
and if they want to pay then you could recreate the entire app to get rid of it.
Just a secondary thought, what if you got one of those fax programs that
created a fax printer object. You could do a print to the fax printer instead. :thumb:
-
Re: Email and possibly a Fax Question with Word
Still need to send it to different numbers. Prolly have to combine pages and send out a packet to each one. That's why I was thinking that I could leave it as a merged document that they could fax pages 1-4 to fax #1, then delete the pages, and do it again with the next number.
It'd be cool if I could create the merge document to be the different pages, and then merge the 4 page document with the 7 recipients. Now, I create 28 page merged documents.
-
Re: Email and possibly a Fax Question with Word
So your saying that you have 7 clients that each get 4 pages and all 28 pages are in the one MM doc?
-
Re: Email and possibly a Fax Question with Word
it varies from day to day, but that is the general overview. x clients get y sheets. they are grouped together with the SQL statement.
-
Re: Email and possibly a Fax Question with Word
Why are all the clients grouped together if you are breaking them apart and sending them separately?
Would it be better to have a MM for a particular client of whatever number of pages that they may have.
Send that out to them and then do another one for another client and so on?
Perhaps you could have a UserForm populated with clients. Then you could choose which client that
particular MM is going to be for and modify the query to be parameterized for the client name, etc?
-
Re: Email and possibly a Fax Question with Word
The clients never change. Just the data that is sent to them. We query based on a date, and then set up the table with the relationship of the first client y times, then the second client y times. Then the mail merge does all of the work correctly.
Because the number of pages changes each time, I can't use the more than the one page merge .dot file. It would be nice if the document would reproduce on the next page for different records that are to be sent. Then, I could have a 4 page merge document today, and an 8 page merge document tomorrow.
Can you think of any way to do *that* ?