|
-
Feb 18th, 2005, 04:58 PM
#1
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
VB/Office Guru™ (AKA: Gangsta Yoda™ ®)
I dont answer coding questions via PM. Please post a thread in the appropriate forum. 
Microsoft MVP 2006-2011
Office Development FAQ (C#, VB.NET, VB 6, VBA)
Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
If a post has helped you then Please Rate it! 
• Reps & Rating Posts • VS.NET on Vista • Multiple .NET Framework Versions • Office Primary Interop Assemblies • VB/Office Guru™ Word SpellChecker™.NET • VB/Office Guru™ Word SpellChecker™ VB6 • VB.NET Attributes Ex. • Outlook Global Address List • API Viewer utility • .NET API Viewer Utility •
System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6 
-
Feb 18th, 2005, 05:01 PM
#2
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?
Last edited by dglienna; Feb 18th, 2005 at 05:28 PM.
-
Feb 18th, 2005, 05:04 PM
#3
Re: Email and possibly a Fax Question with Word
This should work, but it depends on how your recordset is setup .
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.
VB/Office Guru™ (AKA: Gangsta Yoda™ ®)
I dont answer coding questions via PM. Please post a thread in the appropriate forum. 
Microsoft MVP 2006-2011
Office Development FAQ (C#, VB.NET, VB 6, VBA)
Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
If a post has helped you then Please Rate it! 
• Reps & Rating Posts • VS.NET on Vista • Multiple .NET Framework Versions • Office Primary Interop Assemblies • VB/Office Guru™ Word SpellChecker™.NET • VB/Office Guru™ Word SpellChecker™ VB6 • VB.NET Attributes Ex. • Outlook Global Address List • API Viewer utility • .NET API Viewer Utility •
System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6 
-
Feb 18th, 2005, 05:30 PM
#4
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.
-
Feb 18th, 2005, 05:59 PM
#5
Re: Email and possibly a Fax Question with Word
VB/Office Guru™ (AKA: Gangsta Yoda™ ®)
I dont answer coding questions via PM. Please post a thread in the appropriate forum. 
Microsoft MVP 2006-2011
Office Development FAQ (C#, VB.NET, VB 6, VBA)
Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
If a post has helped you then Please Rate it! 
• Reps & Rating Posts • VS.NET on Vista • Multiple .NET Framework Versions • Office Primary Interop Assemblies • VB/Office Guru™ Word SpellChecker™.NET • VB/Office Guru™ Word SpellChecker™ VB6 • VB.NET Attributes Ex. • Outlook Global Address List • API Viewer utility • .NET API Viewer Utility •
System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6 
-
Feb 18th, 2005, 06:11 PM
#6
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?
-
Feb 18th, 2005, 06:18 PM
#7
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 ???
 Originally Posted by dglienna
Is there a way to programmatically set up for clients?
How do you mean.
VB/Office Guru™ (AKA: Gangsta Yoda™ ®)
I dont answer coding questions via PM. Please post a thread in the appropriate forum. 
Microsoft MVP 2006-2011
Office Development FAQ (C#, VB.NET, VB 6, VBA)
Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
If a post has helped you then Please Rate it! 
• Reps & Rating Posts • VS.NET on Vista • Multiple .NET Framework Versions • Office Primary Interop Assemblies • VB/Office Guru™ Word SpellChecker™.NET • VB/Office Guru™ Word SpellChecker™ VB6 • VB.NET Attributes Ex. • Outlook Global Address List • API Viewer utility • .NET API Viewer Utility •
System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6 
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|