Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Mail merge no output on network

Status
Not open for further replies.

crpryor1

Programmer
Mar 25, 1999
21
US
I have VFP 7.0, Office 2000. This routine works on my PC, but when I run it on a network I don’t get any printout or any errors.

#DEFINE wdMainAndDataSource 2
#DEFINE wdSendToPrinter 1
#DEFINE wdDoNotSaveChanges 0
#DEFINE wdWindowStateMinimize 2

oWord = CREATEOBJECT("Word.Application")
oWord.Visible = .F.

oWord.Documents.Open("&gcProgPath"+"data\palife.doc")

If oWord.ActiveDocument.MailMerge.State = wdMainAndDataSource
oWord.ActiveDocument.MailMerge.Destination = wdSendToPrinter

Thanks in advance
Chuck
oWord.ActiveDocument.MailMerge.DataSource.FirstRecord = 1
oWord.ActiveDocument.MailMerge.DataSource.LastRecord = 1
oWord.ActiveDocument.MailMerge.Execute
endif
oWord.Quit(wdDoNotSaveChanges) && close file no save
release oWord
 
Chuck,

I don't really know what you mean by "run it on a network". What exactly is different from when you run it on your PC?

When running it on the network, try stepping through in the debugger and see if that shows up anything.

By the way, your line
Code:
oWord.Documents.Open("&gcProgPath"+"data\palife.doc")
- you shouldn't need the quotes and & around the variable gcProgPath.

Hope that helps,

Stewart
PS If you want to get the best response to a question, please check out FAQ184-2483 first.
 
Stewart,
Thanks for the reply.

I get a printout from my home office PC, It works fine here. But from my clients workstations I don’t get any printout. I do get an hourglass on the screen.

chuck
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top