Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #4   Report Post  
Posted to microsoft.public.word.mailmerge.fields
Peter Jamieson Peter Jamieson is offline
external usenet poster
 
Posts: 4,582
Default Is Word 2003 SP2 Mailmerge buggy?

Mike-

I'll have a look, but it won't be today.


--
Peter Jamieson
http://tips.pjmsn.me.uk

"Mike" S wrote in message
...
In message
at 19:24:28 on Tue, 9 Dec 2008, Peter Jamieson
wrote
Are you writing the text file while the Word mail merge main document is
open, with the .txt file open as the data source? (Actually, I am not sure
that you can do that, but if you can, I'm wondering whether Word can get
confused).

Thanks for your reply

No - I format my text file using this sort of code

giHandle = FreeFile
Open ThisWorkbook.Path & "\EbayLabelsData.doc" For Output As #giHandle

Print #giHandle, lsHeader

For liCount = 1 To liSkip
Print #giHandle, lsBlank
Next

# Print a line of data
Print #giHandle, lsString

Close #giHandle


And then immediately open the mail merge main document.


'************************
'* Open Labels document *
'************************
Sub WordLabels()

Dim loWord As Word.Application


'See if word's already running
On Error Resume Next
Set loWord = GetObject(, "Word.Application")
If Err Then
'No, so start a new word session
Set loWord = New Word.Application
Err.Clear
End If

loWord.Documents.Open (ThisWorkbook.Path & "\EbayLabelsV2.doc")
loWord.WindowState = wdWindowStateMaximize
SetQueue loWord
loWord.Visible = True
loWord.Activate
WaitDocClose loWord

Set loWord = Nothing

End Sub


Should I put a small delay in before calling WordLabels, or could this
be coded in a better way. SetQueue is a procedure I have for changing
my default print queue to the one I use for labels. Once the document
appears, I then manually select File/Print
--
Mike News


 
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
Buggy tables and styles RoxSn Tables 0 March 16th 07 04:14 PM
Wildcard search... buggy? avcarrie Microsoft Word Help 9 November 11th 06 06:18 AM
Word Bug: Find/Replace wildcards while track changes is turned on is buggy [email protected] Microsoft Word Help 2 February 24th 06 09:35 AM
buggy new-page layout in Word 2003 Excrafts Page Layout 3 January 4th 06 12:44 AM
Buggy Hyperlink in Word Diana Microsoft Word Help 0 February 4th 05 10:07 PM


All times are GMT +1. The time now is 04:06 PM.

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"