Similar Threads:
1.Doing a MailMerge to Word 2007
The code below has worked for years until my client updated their software to
2007. Now the mail merge part is broken. Any ideas?
Set myWord = New Word.Application
myWord.Visible = True
'Start a new main document for the mail merge.
Set myDoc = myWord.Documents.Open(sFileName)
With myDoc.MailMerge
.MainDocumentType = wdFormLetters
'Set up the mail merge data source.
sDBPath = CurrentProject.FullName
.OpenDataSource Name:=sDBPath, SQLStatement:="SELECT * FROM
[qryThankYou]"
.Destination = wdSendToNewDocument
.Execute Pause:=False
End With
myDoc.Close
2.Can a Word merge be done thru code?
Hi;
I have a Word template in "F:\MyDocs\Template1.doc" and want to bind it to a
table (e.g. MergeTBL having fields named F1 to F6),so that i can open this
file in a loop for each record of the MergeTBL.Can it be done thru
coding?What will be the code
I appreciate you and thank you in advance for your help.
3.Doing a Word 2003 Mail Merge from Access 2003
Hi ,
I have everything in place from the access database side, i can select a
record, create a query in VB "ContractSelect" that contains one record that
i want Word 2003 to display as its datasource when it prints, but what
happens is that when ever i open/launch word from WITHIN Access 2003 it
always shows the last record data from the previous time i ran the program.
BUT if i start Word manually it says connect to SQL...blah and works
correctly.
The access datbase is called Contracts.mdb
The Query in the datbase is called ContractSelect
strDocName Contains the full path and filename for the word mailmerge doc
The code in Access to open word i have created is this:-
Sub OpenWordDoc(strDocName As String)
Dim objApp As Object
' Opens the document
Set objApp = CreateObject("Word.Application")
objApp.Visible = True
objApp.Documents.Open strDocName
' This next bit maybe complete crap....but i cant find any help on doing it
.....
objApp.Documents(1).MailMerge.opendataSource _
Name:="C:\data\contracts.mdb", LinkToSource:=True _
, Connection:="QUERIES ContractSelect", SQLStatement:="SELECT * FROM
ContractSelect;"
' Execute the mail merge.
objApp.Documents(1).MailMerge.Execute
End Sub
using the above It opens the document but now comes up with the "data link
Properties box" Then the "Confirm data Source" dialog where I select MS
Access Datbases via DDE (*.mdb,*.mde), then i get an error saying "Word was
unable to open the data source."
Id very much appreciate it someone could help me with this begginers
question.
Thanks
Colin
4.introducing words OK, doing cuts NO
Hi
i have a problem. I want to allow people from introducing words in cells in a sheet, but i don't want them to do cuts (ctrl x) to cells
can i do that
thanks
5.Help-doing mail merge between excel & word brings 8-9 extra nos
I use 2003 word and excel; in doing a mail merge using excel spreadsheet as
the data source, I merged vacation and PTO accruals and totals into word
table and have tried to format the cells as general, text, custom and it
still brings over about 8 numbers after the decimal and only way to get rid
of them is to go in each cell of table and delete. Am under deadline to
finish these for 3 of our divisions and want to be able to clean this up
without doing it manually in each cell. Please help!
6. Word 2004 crashes when doing data merge......
7. Mac Word shuts down sometimes when saving or doing spell check in another language
8. Not Doing a Maggie