Reply
 
Thread Tools Display Modes
  #1   Report Post  
Posted to microsoft.public.word.mailmerge.fields
alamas
 
Posts: n/a
Default Error to Automation mailmerge to printer in word 2003


hi!
Automation mailmerge with next vb code:

g_objWord.Documents.Open
FileName:=GetTitleFromFilename(g_strFileTemplate)
g_objWord.ActiveDocument.MailMerge.MainDocumentTyp e = wdFormLetters
g_objWord.ActiveDocument.MailMerge..OpenDataSource Name:=sDataFile
g_objWord.Options.UpdateLinksAtPrint = True
g_objWord.Options.UpdateFieldsAtPrint = True


With g_objWord.ActiveDocument
.MailMerge.SuppressBlankLines = False
.MailMerge.Destination = 1 '= wdSendToPrinter
.MailMerge.DataSource.FirstRecord = 1
.MailMerge.DataSource.LastRecord = -16
.MailMerge.Execute
.Close 0
End With

'*************************************************
the template has a table. I need adjust the dimensions of cells in my
table to reflect the data that is in them.

It works correctly when:
- mailmerge to a new document.(Manually or with this code)
- mailmerge to printer.(Manually)

I want to send the document to a printer.


Thanks.


--
alamas
  #2   Report Post  
Posted to microsoft.public.word.mailmerge.fields
Doug Robbins - Word MVP
 
Posts: n/a
Default Error to Automation mailmerge to printer in word 2003

And what happens when you use the code to merge it to the printer?

How to you expect to be able to adjust the dimensions of the cells of the
table if you are going to use automation to merge the document directly to
the printer?

--
Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.

Doug Robbins - Word MVP

"alamas" wrote in message
...

hi!
Automation mailmerge with next vb code:

g_objWord.Documents.Open
FileName:=GetTitleFromFilename(g_strFileTemplate)
g_objWord.ActiveDocument.MailMerge.MainDocumentTyp e = wdFormLetters
g_objWord.ActiveDocument.MailMerge..OpenDataSource Name:=sDataFile
g_objWord.Options.UpdateLinksAtPrint = True
g_objWord.Options.UpdateFieldsAtPrint = True


With g_objWord.ActiveDocument
MailMerge.SuppressBlankLines = False
MailMerge.Destination = 1 '= wdSendToPrinter
MailMerge.DataSource.FirstRecord = 1
MailMerge.DataSource.LastRecord = -16
MailMerge.Execute
Close 0
End With

'*************************************************
the template has a table. I need adjust the dimensions of cells in my
table to reflect the data that is in them.

It works correctly when:
- mailmerge to a new document.(Manually or with this code)
- mailmerge to printer.(Manually)

I want to send the document to a printer.


Thanks.


--
alamas



  #3   Report Post  
Posted to microsoft.public.word.mailmerge.fields
alamas
 
Posts: n/a
Default Error to Automation mailmerge to printer in word 2003


My printer is Acrobat distiller 5
when i use the code to merge it to the printer i obtain the pdf
document without to adjust the dimensions of the cells.
with word 2000 works correctly although it shows the print dialog box.


--
alamas
  #4   Report Post  
Posted to microsoft.public.word.mailmerge.fields
Doug Robbins - Word MVP
 
Posts: n/a
Default Error to Automation mailmerge to printer in word 2003

See the article "How to do a mail merge to the printer using VBA, without
displaying the Print dialog" at:

http://www.word.mvps.org/FAQs/MailMe...PrintrWVBA.htm


--
Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.

Doug Robbins - Word MVP

"alamas" wrote in message
...

My printer is Acrobat distiller 5
when i use the code to merge it to the printer i obtain the pdf
document without to adjust the dimensions of the cells.
with word 2000 works correctly although it shows the print dialog box.


--
alamas



Reply
Thread Tools
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
take yet another lesson from wordperfect "reveal codes" wordperfect is superior Microsoft Word Help 5 May 11th 09 07:58 PM
Word 2003 does not recognize default printer. George3095 Microsoft Word Help 5 January 31st 06 06:36 PM
How can Word display full path of a file in the title bar? SAsif Microsoft Word Help 1 January 26th 06 04:32 PM
Word 2003 Mailmerge problem - works in Word 2000 Rick Robinson Mailmerge 2 April 28th 05 10:16 AM
Envelope Address GR New Users 5 April 24th 05 09:48 PM


All times are GMT +1. The time now is 10:48 AM.

Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 Microsoft Office Word Forum - WordBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Word"