Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Mail Merge problems


Hi,

I have a worksheet containing names and addresses and I need to prin
labels for this list.

I am linking across to Word Mail Merge with the following code



Code
-------------------


Sub labelprint()
Dim objWord As Object
' Start app
Set objWord = CreateObject("Word.application")
' Open doc
objWord.Documents.Open Filename:="\\Svr1\lampandgear\users\Alec\Pipeline\ Address Labels.doc"
objWord.Visible = True
' Print doc
objWord.Application.PrintOut
' close & save doc
objWord.ActiveDocument.Close savechanges:=True
Set objWord = Nothing
End Sub


-------------------


Unfortunately I have 2 problems with it....

1. The Word doc tries to re-launch the mail merge associated xl
document (data source) on launch, and as it is already open this the
results in it offering a read only version and means that potentiall
the user is left with multiple open copies of the xls doc.

2. The Word document doesnt appear to "run" the merge prior to printin
(even though it has opened and referenced the data source).

I know that these are probably Word questions but has anyone come u
against them before and know any solutions?

Thank

--
Alec
-----------------------------------------------------------------------
Alec H's Profile: http://www.excelforum.com/member.php...fo&userid=3104
View this thread: http://www.excelforum.com/showthread.php?threadid=51816

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
problems using Excel as a mail merge database in Office XP djcten Excel Worksheet Functions 3 December 28th 06 05:26 PM
Code launches Mail Merge but disables the Mail Merge austris Excel Discussion (Misc queries) 0 October 14th 06 01:11 AM
mail merge problems Bill Setting up and Configuration of Excel 0 September 23rd 05 05:07 PM
MAIL MERGE PROBLEMS FNORD Excel Discussion (Misc queries) 3 February 12th 05 01:06 AM
Real problems automating a mail merge nath Excel Programming 0 June 10th 04 11:32 AM


All times are GMT +1. The time now is 05:29 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"