Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.word.mailmerge.fields
|
|||
|
|||
Mailmerge issue
Hi
There is macro defined in one of the word document. one of the line is ..Destination = wdSendToNewDocument I am getting an error saying that requested object not found.I checked under preferences and saw that microsoft word lib is checked. Any ideas? P.S I am not a developer. Thanks for all your help manish |
#2
Posted to microsoft.public.word.mailmerge.fields
|
|||
|
|||
Mailmerge issue
Hi Manish,
The problem could be caused by an error in your coding earlier on. What's the the code for rest of this sub? Cheers "Manish" wrote in message . .. Hi There is macro defined in one of the word document. one of the line is .Destination = wdSendToNewDocument I am getting an error saying that requested object not found.I checked under preferences and saw that microsoft word lib is checked. Any ideas? P.S I am not a developer. Thanks for all your help manish |
#3
Posted to microsoft.public.word.mailmerge.fields
|
|||
|
|||
Mailmerge issue
On Thu, 3 Jul 2008 10:55:21 +1000, macropod wrote:
Hi Manish, The problem could be caused by an error in your coding earlier on. What's the the code for rest of this sub? Cheers "Manish" wrote in message . .. Hi There is macro defined in one of the word document. one of the line is .Destination = wdSendToNewDocument I am getting an error saying that requested object not found.I checked under preferences and saw that microsoft word lib is checked. Any ideas? P.S I am not a developer. Thanks for all your help manish The thing is that the macro runs on all the machines except 2 of them. So i am wondering if something is missing on those machines. The rest of the code is Public Sub MAIN() With ActiveDocument.MailMerge .Destination = wdSendToNewDocument (fails here) .Execute End With Documents("InvoiceCoversheetmm.doc").Close SaveChanges:=wdDoNotSaveChanges Rem ActiveDocument.SaveAs FileName:="C:\AMAPS\InvoiceCoverSheet.doc", FileFormat:= _ Rem wdFormatDocument, LockComments:=False, Password:="", AddToRecentFiles:= _ Rem True, WritePassword:="", ReadOnlyRecommended:=False, EmbedTrueTypeFonts:= _ Rem False, SaveNativePictureFormat:=False, SaveFormsData:=False, _ Rem SaveAsAOCELetter:=False Rem Dim Counter Rem Counter = 0 Rem While Counter 1000000 Rem Counter = Counter + 1 Rem Wend Rem Application.PrintOut PrintBackground = True, FileName:="C:\AMAPS\InvoiceCoverSheet.doc" Rem Application.Quit (wdDoNotSaveChanges) End Sub Thanks manish |
#4
Posted to microsoft.public.word.mailmerge.fields
|
|||
|
|||
Mailmerge issue
Hi Manish,
Well, if the code runs correctly on other machines, then there's a problem with the machines it doesn't run on - not with the code, per se. Have you tried running 'Office Diagnostics' (Office 2007) or 'Detect & Repair' (Office 2000 +) to correct any installation problems? Have you also checked that the faulty PCs are fully updated with their Office installations? And, have you checked that the faulty PCs have the same vba references set as the good ones? -- Cheers macropod [MVP - Microsoft Word] "Manish" wrote in message .. . On Thu, 3 Jul 2008 10:55:21 +1000, macropod wrote: Hi Manish, The problem could be caused by an error in your coding earlier on. What's the the code for rest of this sub? Cheers "Manish" wrote in message . .. Hi There is macro defined in one of the word document. one of the line is .Destination = wdSendToNewDocument I am getting an error saying that requested object not found.I checked under preferences and saw that microsoft word lib is checked. Any ideas? P.S I am not a developer. Thanks for all your help manish The thing is that the macro runs on all the machines except 2 of them. So i am wondering if something is missing on those machines. The rest of the code is Public Sub MAIN() With ActiveDocument.MailMerge .Destination = wdSendToNewDocument (fails here) .Execute End With Documents("InvoiceCoversheetmm.doc").Close SaveChanges:=wdDoNotSaveChanges Rem ActiveDocument.SaveAs FileName:="C:\AMAPS\InvoiceCoverSheet.doc", FileFormat:= _ Rem wdFormatDocument, LockComments:=False, Password:="", AddToRecentFiles:= _ Rem True, WritePassword:="", ReadOnlyRecommended:=False, EmbedTrueTypeFonts:= _ Rem False, SaveNativePictureFormat:=False, SaveFormsData:=False, _ Rem SaveAsAOCELetter:=False Rem Dim Counter Rem Counter = 0 Rem While Counter 1000000 Rem Counter = Counter + 1 Rem Wend Rem Application.PrintOut PrintBackground = True, FileName:="C:\AMAPS\InvoiceCoverSheet.doc" Rem Application.Quit (wdDoNotSaveChanges) End Sub Thanks manish |
#5
Posted to microsoft.public.word.mailmerge.fields
|
|||
|
|||
Mailmerge issue
You will see this message if there is no MailMerge object in the document,
and that will happen if Word did not open the datasource. At the moment I would say there are two strong possibilities why thiat would happen on some machines and not others: a. http://support.microsoft.com/kb/825765/en-us has been applied on some machines and not others b. Word updates are more up-to-date on some machines than others (a fairly recent security update has altered Word's behaviour when it is opening MailMerge documents). -- Peter Jamieson http://tips.pjmsn.me.uk "Manish" wrote in message .. . On Thu, 3 Jul 2008 10:55:21 +1000, macropod wrote: Hi Manish, The problem could be caused by an error in your coding earlier on. What's the the code for rest of this sub? Cheers "Manish" wrote in message . .. Hi There is macro defined in one of the word document. one of the line is .Destination = wdSendToNewDocument I am getting an error saying that requested object not found.I checked under preferences and saw that microsoft word lib is checked. Any ideas? P.S I am not a developer. Thanks for all your help manish The thing is that the macro runs on all the machines except 2 of them. So i am wondering if something is missing on those machines. The rest of the code is Public Sub MAIN() With ActiveDocument.MailMerge .Destination = wdSendToNewDocument (fails here) .Execute End With Documents("InvoiceCoversheetmm.doc").Close SaveChanges:=wdDoNotSaveChanges Rem ActiveDocument.SaveAs FileName:="C:\AMAPS\InvoiceCoverSheet.doc", FileFormat:= _ Rem wdFormatDocument, LockComments:=False, Password:="", AddToRecentFiles:= _ Rem True, WritePassword:="", ReadOnlyRecommended:=False, EmbedTrueTypeFonts:= _ Rem False, SaveNativePictureFormat:=False, SaveFormsData:=False, _ Rem SaveAsAOCELetter:=False Rem Dim Counter Rem Counter = 0 Rem While Counter 1000000 Rem Counter = Counter + 1 Rem Wend Rem Application.PrintOut PrintBackground = True, FileName:="C:\AMAPS\InvoiceCoverSheet.doc" Rem Application.Quit (wdDoNotSaveChanges) End Sub Thanks manish |
Reply |
Thread Tools | |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
MS fix for this issue | Formatting Long Documents | |||
Markup issue | Microsoft Word Help | |||
Word issue when using | Microsoft Word Help | |||
OLE Issue | Microsoft Word Help | |||
Issue with Data Sourde in Mailmerge | Mailmerge |