|
|
Hi all,
I am using VBA to create MS Access applications. When my clients get the application, they are only getting the Access run-time; they don't need the full version of Access in order to run the application. The problem that I am having with is, I am using VBA to do a mailmerge from a recordset in Access to a new word document or existing word document. This feature works on most of my cleints' machines. However, for certain clients, when the word document comes up, the Insert Merge Fields option in the Mail Merge Toolbar would be greyed out. For these clients that are having problem, they are all using Windows XP Professional with MS Word 2003. The weird thing is, I have Windows XP Professional with MS Word 2003 too but it works for me every single time. My codes are as follows, can anyone give me some pointers on how to correct the problem please?
Thanks in advance, Monte
Set WordApp = CreateObject("Word.Application")
If stMergeDoc = "" Then 'Create a new Word doc
Set WordDoc = WordApp.Documents.Add
Else 'Open the word document selected by the user
Set WordDoc = WordApp.Documents.Open(stMergeDoc) 'Set objWord = GetObject(stMergeDoc, "Word.Document")
End If
WordApp.Visible = True 'objWord.Application.Visible = True
WordDoc.MailMerge.OpenDataSource _ Name:=CurrentDb.Name, _ LinkToSource:=True, _ Connection:="QUERY " & stMergeSrc, _ SubType:=wdMergeSubTypeWord2000 'SQLStatement:=strSQL
If Err.Number = 448 Then 'they have word 2000, so try again without the subtype argument
WordDoc.MailMerge.OpenDataSource _ Name:=CurrentDb.Name, _ LinkToSource:=True, _ Connection:="QUERY " & stMergeSrc End If
|
|
Maybe the "Opening This Will Run the Following SQL Command" Message is getting in the way.
See:http://support.microsoft.com?kbid=825765
-- 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
<sweetguy1only[ at ]gmail.com> wrote in message news:1178766346.338933.162110[ at ]e65g2000hsc.googlegroups.com...
[Quoted Text] > Hi all, > > I am using VBA to create MS Access applications. When my clients get > the application, they are only getting the Access run-time; they > don't > need the full version of Access in order to run the application. The > problem that I am having with is, I am using VBA to do a mailmerge > from a recordset in Access to a new word document or existing word > document. This feature works on most of my cleints' machines. > However, for certain clients, when the word document comes up, the > Insert Merge Fields option in the Mail Merge Toolbar would be greyed > out. For these clients that are having problem, they are all using > Windows XP Professional with MS Word 2003. The weird thing is, I > have > Windows XP Professional with MS Word 2003 too but it works for me > every single time. My codes are as follows, can anyone give me some > pointers on how to correct the problem please? > > > Thanks in advance, > Monte > > > Set WordApp = CreateObject("Word.Application") > > > If stMergeDoc = "" Then 'Create a new Word doc > > > Set WordDoc = WordApp.Documents.Add > > > Else 'Open the word document selected by the user > > > Set WordDoc = WordApp.Documents.Open(stMergeDoc) > 'Set objWord = GetObject(stMergeDoc, "Word.Document") > > > End If > > > WordApp.Visible = True > 'objWord.Application.Visible = True > > > WordDoc.MailMerge.OpenDataSource _ > Name:=CurrentDb.Name, _ > LinkToSource:=True, _ > Connection:="QUERY " & stMergeSrc, _ > SubType:=wdMergeSubTypeWord2000 > 'SQLStatement:=strSQL > > > If Err.Number = 448 Then 'they have word 2000, so try again > without the subtype argument > > > WordDoc.MailMerge.OpenDataSource _ > Name:=CurrentDb.Name, _ > LinkToSource:=True, _ > Connection:="QUERY " & stMergeSrc > End If >
|
|
On May 10, 2:29 am, "Doug Robbins - Word MVP" <d...[ at ]REMOVECAPSmvps.org> wrote:
[Quoted Text] > Maybe the "Opening This Will Run the Following SQL Command" Message is > getting in the way. > > See: http://support.microsoft.com?kbid=825765> > -- > 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 > > <sweetguy1o...[ at ]gmail.com> wrote in message > > news:1178766346.338933.162110[ at ]e65g2000hsc.googlegroups.com... > > > > > Hi all, > > > I am using VBA to create MS Access applications. When my clients get > > the application, they are only getting the Access run-time; they > > don't > > need the full version of Access in order to run the application. The > > problem that I am having with is, I am using VBA to do a mailmerge > > from a recordset in Access to a new word document or existing word > > document. This feature works on most of my cleints' machines. > > However, for certain clients, when the word document comes up, the > > Insert Merge Fields option in the Mail Merge Toolbar would be greyed > > out. For these clients that are having problem, they are all using > > Windows XP Professional with MS Word 2003. The weird thing is, I > > have > > Windows XP Professional with MS Word 2003 too but it works for me > > every single time. My codes are as follows, can anyone give me some > > pointers on how to correct the problem please? > > > Thanks in advance, > > Monte > > > Set WordApp = CreateObject("Word.Application") > > > If stMergeDoc = "" Then 'Create a new Word doc > > > Set WordDoc = WordApp.Documents.Add > > > Else 'Open the word document selected by the user > > > Set WordDoc = WordApp.Documents.Open(stMergeDoc) > > 'Set objWord = GetObject(stMergeDoc, "Word.Document") > > > End If > > > WordApp.Visible = True > > 'objWord.Application.Visible = True > > > WordDoc.MailMerge.OpenDataSource _ > > Name:=CurrentDb.Name, _ > > LinkToSource:=True, _ > > Connection:="QUERY " & stMergeSrc, _ > > SubType:=wdMergeSubTypeWord2000 > > 'SQLStatement:=strSQL > > > If Err.Number = 448 Then 'they have word 2000, so try again > > without the subtype argument > > > WordDoc.MailMerge.OpenDataSource _ > > Name:=CurrentDb.Name, _ > > LinkToSource:=True, _ > > Connection:="QUERY " & stMergeSrc > > End If- Hide quoted text - > > - Show quoted text - No, my clients don't get that message. However, they do get a message saying Windows has problem starting Microsoft Word.
|
|
Do you ship a .doc with the connection already made to the correct Access path name - i.e. if they opened the Word .doc in Word directly, would you expect it to be connected to the database? If so, it is worth asking them to try that to see what error message they get. It is probably also worth asking them to connect manually to the query to see what happens - if there is no suitable document, asking /one/ of your clients to try that probably wouldn't be too onerous as long as they are reasonably technically-minded, particularly if you can get them to display the mail merge toolbar.
Peter Jamieson <sweetguy1only[ at ]gmail.com> wrote in message news:1178803190.678798.121650[ at ]y80g2000hsf.googlegroups.com...
[Quoted Text] > On May 10, 2:29 am, "Doug Robbins - Word MVP" > <d...[ at ]REMOVECAPSmvps.org> wrote: >> Maybe the "Opening This Will Run the Following SQL Command" Message is >> getting in the way. >> >> See: http://support.microsoft.com?kbid=825765>> >> -- >> 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 >> >> <sweetguy1o...[ at ]gmail.com> wrote in message >> >> news:1178766346.338933.162110[ at ]e65g2000hsc.googlegroups.com... >> >> >> >> > Hi all, >> >> > I am using VBA to create MS Access applications. When my clients get >> > the application, they are only getting the Access run-time; they >> > don't >> > need the full version of Access in order to run the application. The >> > problem that I am having with is, I am using VBA to do a mailmerge >> > from a recordset in Access to a new word document or existing word >> > document. This feature works on most of my cleints' machines. >> > However, for certain clients, when the word document comes up, the >> > Insert Merge Fields option in the Mail Merge Toolbar would be greyed >> > out. For these clients that are having problem, they are all using >> > Windows XP Professional with MS Word 2003. The weird thing is, I >> > have >> > Windows XP Professional with MS Word 2003 too but it works for me >> > every single time. My codes are as follows, can anyone give me some >> > pointers on how to correct the problem please? >> >> > Thanks in advance, >> > Monte >> >> > Set WordApp = CreateObject("Word.Application") >> >> > If stMergeDoc = "" Then 'Create a new Word doc >> >> > Set WordDoc = WordApp.Documents.Add >> >> > Else 'Open the word document selected by the user >> >> > Set WordDoc = WordApp.Documents.Open(stMergeDoc) >> > 'Set objWord = GetObject(stMergeDoc, "Word.Document") >> >> > End If >> >> > WordApp.Visible = True >> > 'objWord.Application.Visible = True >> >> > WordDoc.MailMerge.OpenDataSource _ >> > Name:=CurrentDb.Name, _ >> > LinkToSource:=True, _ >> > Connection:="QUERY " & stMergeSrc, _ >> > SubType:=wdMergeSubTypeWord2000 >> > 'SQLStatement:=strSQL >> >> > If Err.Number = 448 Then 'they have word 2000, so try again >> > without the subtype argument >> >> > WordDoc.MailMerge.OpenDataSource _ >> > Name:=CurrentDb.Name, _ >> > LinkToSource:=True, _ >> > Connection:="QUERY " & stMergeSrc >> > End If- Hide quoted text - >> >> - Show quoted text - > > No, my clients don't get that message. However, they do get a message > saying Windows has problem starting Microsoft Word. >
|
|
On May 10, 9:36 am, "Peter Jamieson" <p...[ at ]KillmapSpjjnet.demon.co.uk> wrote:
[Quoted Text] > Do you ship a .doc with the connection already made to the correct Access > path name - i.e. if they opened the Word .doc in Word directly, would you > expect it to be connected to the database? If so, it is worth asking them to > try that to see what error message they get. It is probably also worth > asking them to connect manually to the query to see what happens - if there > is no suitable document, asking /one/ of your clients to try that probably > wouldn't be too onerous as long as they are reasonably technically-minded, > particularly if you can get them to display the mail merge toolbar. > > Peter Jamieson<sweetguy1o...[ at ]gmail.com> wrote in message > > news:1178803190.678798.121650[ at ]y80g2000hsf.googlegroups.com... > > > > > On May 10, 2:29 am, "Doug Robbins - Word MVP" > > <d...[ at ]REMOVECAPSmvps.org> wrote: > >> Maybe the "Opening This Will Run the Following SQL Command" Message is > >> getting in the way. > > >> See: http://support.microsoft.com?kbid=825765> > >> -- > >> 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 > > >> <sweetguy1o...[ at ]gmail.com> wrote in message > > >>news:1178766346.338933.162110[ at ]e65g2000hsc.googlegroups.com... > > >> > Hi all, > > >> > I am using VBA to create MS Access applications. When my clients get > >> > the application, they are only getting the Access run-time; they > >> > don't > >> > need the full version of Access in order to run the application. The > >> > problem that I am having with is, I am using VBA to do a mailmerge > >> > from a recordset in Access to a new word document or existing word > >> > document. This feature works on most of my cleints' machines. > >> > However, for certain clients, when the word document comes up, the > >> > Insert Merge Fields option in the Mail Merge Toolbar would be greyed > >> > out. For these clients that are having problem, they are all using > >> > Windows XP Professional with MS Word 2003. The weird thing is, I > >> > have > >> > Windows XP Professional with MS Word 2003 too but it works for me > >> > every single time. My codes are as follows, can anyone give me some > >> > pointers on how to correct the problem please? > > >> > Thanks in advance, > >> > Monte > > >> > Set WordApp = CreateObject("Word.Application") > > >> > If stMergeDoc = "" Then 'Create a new Word doc > > >> > Set WordDoc = WordApp.Documents.Add > > >> > Else 'Open the word document selected by the user > > >> > Set WordDoc = WordApp.Documents.Open(stMergeDoc) > >> > 'Set objWord = GetObject(stMergeDoc, "Word.Document") > > >> > End If > > >> > WordApp.Visible = True > >> > 'objWord.Application.Visible = True > > >> > WordDoc.MailMerge.OpenDataSource _ > >> > Name:=CurrentDb.Name, _ > >> > LinkToSource:=True, _ > >> > Connection:="QUERY " & stMergeSrc, _ > >> > SubType:=wdMergeSubTypeWord2000 > >> > 'SQLStatement:=strSQL > > >> > If Err.Number = 448 Then 'they have word 2000, so try again > >> > without the subtype argument > > >> > WordDoc.MailMerge.OpenDataSource _ > >> > Name:=CurrentDb.Name, _ > >> > LinkToSource:=True, _ > >> > Connection:="QUERY " & stMergeSrc > >> > End If- Hide quoted text - > > >> - Show quoted text - > > > No, my clients don't get that message. However, they do get a message > > saying Windows has problem starting Microsoft Word.- Hide quoted text - > > - Show quoted text - Thank you very much for your response.
To answer your question, no, I don't ship any .doc with the software. It is up to my clients to define their mail templates.
Most of my clients are not computer savvy at all. Lots of them don't even know how to copy files from their own desktop to a CD or to a flash drive. That's the difficult part. If they know something, I can ask them to try certain thing for me. But since lots of them are not computer savvy, it may do more harm than good if I were to tell them to try things.
|
|
OK, so you can't experiment in the client environment.
Questions/thoughts: a. is there any other obvious difference between the client systems that work and the ones that don't? Perhaps the systems that do not work are operating in a more tightly controlled network environemt? That kind of thing? Maybe you cannot tell. b. Do you have a testbed that more accurately reflects a likely client environment, e.g. does not have any development tools on it? Perhaps in a VM?
Peter Jamieson
<sweetguy1only[ at ]gmail.com> wrote in message news:1178823187.954827.195710[ at ]y5g2000hsa.googlegroups.com...
[Quoted Text] > On May 10, 9:36 am, "Peter Jamieson" <p...[ at ]KillmapSpjjnet.demon.co.uk> > wrote: >> Do you ship a .doc with the connection already made to the correct Access >> path name - i.e. if they opened the Word .doc in Word directly, would you >> expect it to be connected to the database? If so, it is worth asking them >> to >> try that to see what error message they get. It is probably also worth >> asking them to connect manually to the query to see what happens - if >> there >> is no suitable document, asking /one/ of your clients to try that >> probably >> wouldn't be too onerous as long as they are reasonably >> technically-minded, >> particularly if you can get them to display the mail merge toolbar. >> >> Peter Jamieson<sweetguy1o...[ at ]gmail.com> wrote in message >> >> news:1178803190.678798.121650[ at ]y80g2000hsf.googlegroups.com... >> >> >> >> > On May 10, 2:29 am, "Doug Robbins - Word MVP" >> > <d...[ at ]REMOVECAPSmvps.org> wrote: >> >> Maybe the "Opening This Will Run the Following SQL Command" Message is >> >> getting in the way. >> >> >> See: http://support.microsoft.com?kbid=825765>> >> >> -- >> >> 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 >> >> >> <sweetguy1o...[ at ]gmail.com> wrote in message >> >> >>news:1178766346.338933.162110[ at ]e65g2000hsc.googlegroups.com... >> >> >> > Hi all, >> >> >> > I am using VBA to create MS Access applications. When my clients >> >> > get >> >> > the application, they are only getting the Access run-time; they >> >> > don't >> >> > need the full version of Access in order to run the application. >> >> > The >> >> > problem that I am having with is, I am using VBA to do a mailmerge >> >> > from a recordset in Access to a new word document or existing word >> >> > document. This feature works on most of my cleints' machines. >> >> > However, for certain clients, when the word document comes up, the >> >> > Insert Merge Fields option in the Mail Merge Toolbar would be greyed >> >> > out. For these clients that are having problem, they are all using >> >> > Windows XP Professional with MS Word 2003. The weird thing is, I >> >> > have >> >> > Windows XP Professional with MS Word 2003 too but it works for me >> >> > every single time. My codes are as follows, can anyone give me >> >> > some >> >> > pointers on how to correct the problem please? >> >> >> > Thanks in advance, >> >> > Monte >> >> >> > Set WordApp = CreateObject("Word.Application") >> >> >> > If stMergeDoc = "" Then 'Create a new Word doc >> >> >> > Set WordDoc = WordApp.Documents.Add >> >> >> > Else 'Open the word document selected by the user >> >> >> > Set WordDoc = WordApp.Documents.Open(stMergeDoc) >> >> > 'Set objWord = GetObject(stMergeDoc, "Word.Document") >> >> >> > End If >> >> >> > WordApp.Visible = True >> >> > 'objWord.Application.Visible = True >> >> >> > WordDoc.MailMerge.OpenDataSource _ >> >> > Name:=CurrentDb.Name, _ >> >> > LinkToSource:=True, _ >> >> > Connection:="QUERY " & stMergeSrc, _ >> >> > SubType:=wdMergeSubTypeWord2000 >> >> > 'SQLStatement:=strSQL >> >> >> > If Err.Number = 448 Then 'they have word 2000, so try again >> >> > without the subtype argument >> >> >> > WordDoc.MailMerge.OpenDataSource _ >> >> > Name:=CurrentDb.Name, _ >> >> > LinkToSource:=True, _ >> >> > Connection:="QUERY " & stMergeSrc >> >> > End If- Hide quoted text - >> >> >> - Show quoted text - >> >> > No, my clients don't get that message. However, they do get a message >> > saying Windows has problem starting Microsoft Word.- Hide quoted text - >> >> - Show quoted text - > > Thank you very much for your response. > > To answer your question, no, I don't ship any .doc with the software. > It is up to my clients to define their mail templates. > > Most of my clients are not computer savvy at all. Lots of them don't > even know how to copy files from their own desktop to a CD or to a > flash drive. That's the difficult part. If they know something, I > can ask them to try certain thing for me. But since lots of them are > not computer savvy, it may do more harm than good if I were to tell > them to try things. >
|
|
On May 10, 2:10 pm, "Peter Jamieson" <p...[ at ]KillmapSpjjnet.demon.co.uk> wrote:
[Quoted Text] > OK, so you can't experiment in the client environment. > > Questions/thoughts: > a. is there any other obvious difference between the client systems that > work and the ones that don't? Perhaps the systems that do not work are > operating in a more tightly controlled network environemt? That kind of > thing? Maybe you cannot tell. > b. Do you have a testbed that more accurately reflects a likely client > environment, e.g. does not have any development tools on it? Perhaps in a > VM? > > Peter Jamieson > > <sweetguy1o...[ at ]gmail.com> wrote in message > > news:1178823187.954827.195710[ at ]y5g2000hsa.googlegroups.com... > > > > > On May 10, 9:36 am, "Peter Jamieson" <p...[ at ]KillmapSpjjnet.demon.co.uk> > > wrote: > >> Do you ship a .doc with the connection already made to the correct Access > >> path name - i.e. if they opened the Word .doc in Word directly, would you > >> expect it to be connected to the database? If so, it is worth asking them > >> to > >> try that to see what error message they get. It is probably also worth > >> asking them to connect manually to the query to see what happens - if > >> there > >> is no suitable document, asking /one/ of your clients to try that > >> probably > >> wouldn't be too onerous as long as they are reasonably > >> technically-minded, > >> particularly if you can get them to display the mail merge toolbar. > > >> Peter Jamieson<sweetguy1o...[ at ]gmail.com> wrote in message > > >>news:1178803190.678798.121650[ at ]y80g2000hsf.googlegroups.com... > > >> > On May 10, 2:29 am, "Doug Robbins - Word MVP" > >> > <d...[ at ]REMOVECAPSmvps.org> wrote: > >> >> Maybe the "Opening This Will Run the Following SQL Command" Message is > >> >> getting in the way. > > >> >> See: http://support.microsoft.com?kbid=825765> > >> >> -- > >> >> 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 > > >> >> <sweetguy1o...[ at ]gmail.com> wrote in message > > >> >>news:1178766346.338933.162110[ at ]e65g2000hsc.googlegroups.com... > > >> >> > Hi all, > > >> >> > I am using VBA to create MS Access applications. When my clients > >> >> > get > >> >> > the application, they are only getting the Access run-time; they > >> >> > don't > >> >> > need the full version of Access in order to run the application. > >> >> > The > >> >> > problem that I am having with is, I am using VBA to do a mailmerge > >> >> > from a recordset in Access to a new word document or existing word > >> >> > document. This feature works on most of my cleints' machines. > >> >> > However, for certain clients, when the word document comes up, the > >> >> > Insert Merge Fields option in the Mail Merge Toolbar would be greyed > >> >> > out. For these clients that are having problem, they are all using > >> >> > Windows XP Professional with MS Word 2003. The weird thing is, I > >> >> > have > >> >> > Windows XP Professional with MS Word 2003 too but it works for me > >> >> > every single time. My codes are as follows, can anyone give me > >> >> > some > >> >> > pointers on how to correct the problem please? > > >> >> > Thanks in advance, > >> >> > Monte > > >> >> > Set WordApp = CreateObject("Word.Application") > > >> >> > If stMergeDoc = "" Then 'Create a new Word doc > > >> >> > Set WordDoc = WordApp.Documents.Add > > >> >> > Else 'Open the word document selected by the user > > >> >> > Set WordDoc = WordApp.Documents.Open(stMergeDoc) > >> >> > 'Set objWord = GetObject(stMergeDoc, "Word.Document") > > >> >> > End If > > >> >> > WordApp.Visible = True > >> >> > 'objWord.Application.Visible = True > > >> >> > WordDoc.MailMerge.OpenDataSource _ > >> >> > Name:=CurrentDb.Name, _ > >> >> > LinkToSource:=True, _ > >> >> > Connection:="QUERY " & stMergeSrc, _ > >> >> > SubType:=wdMergeSubTypeWord2000 > >> >> > 'SQLStatement:=strSQL > > >> >> > If Err.Number = 448 Then 'they have word 2000, so try again > >> >> > without the subtype argument > > >> >> > WordDoc.MailMerge.OpenDataSource _ > >> >> > Name:=CurrentDb.Name, _ > >> >> > LinkToSource:=True, _ > >> >> > Connection:="QUERY " & stMergeSrc > >> >> > End If- Hide quoted text - > > >> >> - Show quoted text - > > >> > No, my clients don't get that message. However, they do get a message > >> > saying Windows has problem starting Microsoft Word.- Hide quoted text - > > >> - Show quoted text - > > > Thank you very much for your response. > > > To answer your question, no, I don't ship any .doc with the software. > > It is up to my clients to define their mail templates. > > > Most of my clients are not computer savvy at all. Lots of them don't > > even know how to copy files from their own desktop to a CD or to a > > flash drive. That's the difficult part. If they know something, I > > can ask them to try certain thing for me. But since lots of them are > > not computer savvy, it may do more harm than good if I were to tell > > them to try things.- Hide quoted text - > > - Show quoted text - a. Not to my knowledge. The thing is some of my other clients also have Windows XP and Office 2003 and they have no problems either. Only a few of them are having this problem.
b. Yes and it works on my end in the test computer.
|
|
Stepping back a bit...
<< No, my clients don't get that message. However, they do get a message saying Windows has problem starting Microsoft Word.
[Quoted Text] >>
What is this message exactly? Earlier you were saying that the users ended up seeing an open document (I think) but with the field dropdwon greyed out, which suggests that despite a problem starting Word, Access does manage to do it.
Also, when you are automating Word, you would not typically see the SQL message mentioned by Doug. What actually happens is that if the SQLSecurityCheck value in the registry is not set appropriately, Word silently fails to execute the OpenDataSource - in other words, you probably still need to get the users to check and alter that registry value - which may not be easy to do either because they are not technically minded or because its against their network admin's policy. But maybe you can check that on your own test system?
Peter Jamieson <sweetguy1only[ at ]gmail.com> wrote in message news:1179782680.351637.303100[ at ]36g2000prm.googlegroups.com... > On May 10, 2:10 pm, "Peter Jamieson" <p...[ at ]KillmapSpjjnet.demon.co.uk> > wrote: >> OK, so you can't experiment in the client environment. >> >> Questions/thoughts: >> a. is there any other obvious difference between the client systems that >> work and the ones that don't? Perhaps the systems that do not work are >> operating in a more tightly controlled network environemt? That kind of >> thing? Maybe you cannot tell. >> b. Do you have a testbed that more accurately reflects a likely client >> environment, e.g. does not have any development tools on it? Perhaps in a >> VM? >> >> Peter Jamieson >> >> <sweetguy1o...[ at ]gmail.com> wrote in message >> >> news:1178823187.954827.195710[ at ]y5g2000hsa.googlegroups.com... >> >> >> >> > On May 10, 9:36 am, "Peter Jamieson" <p...[ at ]KillmapSpjjnet.demon.co.uk> >> > wrote: >> >> Do you ship a .doc with the connection already made to the correct >> >> Access >> >> path name - i.e. if they opened the Word .doc in Word directly, would >> >> you >> >> expect it to be connected to the database? If so, it is worth asking >> >> them >> >> to >> >> try that to see what error message they get. It is probably also worth >> >> asking them to connect manually to the query to see what happens - if >> >> there >> >> is no suitable document, asking /one/ of your clients to try that >> >> probably >> >> wouldn't be too onerous as long as they are reasonably >> >> technically-minded, >> >> particularly if you can get them to display the mail merge toolbar. >> >> >> Peter Jamieson<sweetguy1o...[ at ]gmail.com> wrote in message >> >> >>news:1178803190.678798.121650[ at ]y80g2000hsf.googlegroups.com... >> >> >> > On May 10, 2:29 am, "Doug Robbins - Word MVP" >> >> > <d...[ at ]REMOVECAPSmvps.org> wrote: >> >> >> Maybe the "Opening This Will Run the Following SQL Command" Message >> >> >> is >> >> >> getting in the way. >> >> >> >> See:http://support.microsoft.com?kbid=825765 >> >> >> >> -- >> >> >> 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 >> >> >> >> <sweetguy1o...[ at ]gmail.com> wrote in message >> >> >> >>news:1178766346.338933.162110[ at ]e65g2000hsc.googlegroups.com... >> >> >> >> > Hi all, >> >> >> >> > I am using VBA to create MS Access applications. When my clients >> >> >> > get >> >> >> > the application, they are only getting the Access run-time; they >> >> >> > don't >> >> >> > need the full version of Access in order to run the application. >> >> >> > The >> >> >> > problem that I am having with is, I am using VBA to do a >> >> >> > mailmerge >> >> >> > from a recordset in Access to a new word document or existing >> >> >> > word >> >> >> > document. This feature works on most of my cleints' machines. >> >> >> > However, for certain clients, when the word document comes up, >> >> >> > the >> >> >> > Insert Merge Fields option in the Mail Merge Toolbar would be >> >> >> > greyed >> >> >> > out. For these clients that are having problem, they are all >> >> >> > using >> >> >> > Windows XP Professional with MS Word 2003. The weird thing is, I >> >> >> > have >> >> >> > Windows XP Professional with MS Word 2003 too but it works for me >> >> >> > every single time. My codes are as follows, can anyone give me >> >> >> > some >> >> >> > pointers on how to correct the problem please? >> >> >> >> > Thanks in advance, >> >> >> > Monte >> >> >> >> > Set WordApp = CreateObject("Word.Application") >> >> >> >> > If stMergeDoc = "" Then 'Create a new Word doc >> >> >> >> > Set WordDoc = WordApp.Documents.Add >> >> >> >> > Else 'Open the word document selected by the user >> >> >> >> > Set WordDoc = WordApp.Documents.Open(stMergeDoc) >> >> >> > 'Set objWord = GetObject(stMergeDoc, "Word.Document") >> >> >> >> > End If >> >> >> >> > WordApp.Visible = True >> >> >> > 'objWord.Application.Visible = True >> >> >> >> > WordDoc.MailMerge.OpenDataSource _ >> >> >> > Name:=CurrentDb.Name, _ >> >> >> > LinkToSource:=True, _ >> >> >> > Connection:="QUERY " & stMergeSrc, _ >> >> >> > SubType:=wdMergeSubTypeWord2000 >> >> >> > 'SQLStatement:=strSQL >> >> >> >> > If Err.Number = 448 Then 'they have word 2000, so try >> >> >> > again >> >> >> > without the subtype argument >> >> >> >> > WordDoc.MailMerge.OpenDataSource _ >> >> >> > Name:=CurrentDb.Name, _ >> >> >> > LinkToSource:=True, _ >> >> >> > Connection:="QUERY " & stMergeSrc >> >> >> > End If- Hide quoted text - >> >> >> >> - Show quoted text - >> >> >> > No, my clients don't get that message. However, they do get a >> >> > message >> >> > saying Windows has problem starting Microsoft Word.- Hide quoted >> >> > text - >> >> >> - Show quoted text - >> >> > Thank you very much for your response. >> >> > To answer your question, no, I don't ship any .doc with the software. >> > It is up to my clients to define their mail templates. >> >> > Most of my clients are not computer savvy at all. Lots of them don't >> > even know how to copy files from their own desktop to a CD or to a >> > flash drive. That's the difficult part. If they know something, I >> > can ask them to try certain thing for me. But since lots of them are >> > not computer savvy, it may do more harm than good if I were to tell >> > them to try things.- Hide quoted text - >> >> - Show quoted text - > > a. Not to my knowledge. The thing is some of my other clients also > have Windows XP and Office 2003 and they have no problems either. > Only a few of them are having this problem. > > b. Yes and it works on my end in the test computer. >
|
|
On May 22, 6:16 am, "Peter Jamieson" <p...[ at ]KillmapSpjjnet.demon.co.uk> wrote:
[Quoted Text] > Stepping back a bit... > > << > No, my clients don't get that message. However, they do get a message > saying Windows has problem starting Microsoft Word. > > > > What is this message exactly? Earlier you were saying that the users ended > up seeing an open document (I think) but with the field dropdwon greyed out, > which suggests that despite a problem starting Word, Access does manage to > do it. > > Also, when you are automating Word, you would not typically see the SQL > message mentioned by Doug. What actually happens is that if the > SQLSecurityCheck value in the registry is not set appropriately, Word > silently fails to execute the OpenDataSource - in other words, you probably > still need to get the users to check and alter that registry value - which > may not be easy to do either because they are not technically minded or > because its against their network admin's policy. But maybe you can check > that on your own test system? > > Peter Jamieson<sweetguy1o...[ at ]gmail.com> wrote in message > > news:1179782680.351637.303100[ at ]36g2000prm.googlegroups.com... > > > > > On May 10, 2:10 pm, "Peter Jamieson" <p...[ at ]KillmapSpjjnet.demon.co.uk> > > wrote: > >> OK, so you can't experiment in the client environment. > > >> Questions/thoughts: > >> a. is there any other obvious difference between the client systems that > >> work and the ones that don't? Perhaps the systems that do not work are > >> operating in a more tightly controlled network environemt? That kind of > >> thing? Maybe you cannot tell. > >> b. Do you have a testbed that more accurately reflects a likely client > >> environment, e.g. does not have any development tools on it? Perhaps in a > >> VM? > > >> Peter Jamieson > > >> <sweetguy1o...[ at ]gmail.com> wrote in message > > >>news:1178823187.954827.195710[ at ]y5g2000hsa.googlegroups.com... > > >> > On May 10, 9:36 am, "Peter Jamieson" <p...[ at ]KillmapSpjjnet.demon.co.uk> > >> > wrote: > >> >> Do you ship a .doc with the connection already made to the correct > >> >> Access > >> >> path name - i.e. if they opened the Word .doc in Word directly, would > >> >> you > >> >> expect it to be connected to the database? If so, it is worth asking > >> >> them > >> >> to > >> >> try that to see what error message they get. It is probably also worth > >> >> asking them to connect manually to the query to see what happens - if > >> >> there > >> >> is no suitable document, asking /one/ of your clients to try that > >> >> probably > >> >> wouldn't be too onerous as long as they are reasonably > >> >> technically-minded, > >> >> particularly if you can get them to display the mail merge toolbar. > > >> >> Peter Jamieson<sweetguy1o...[ at ]gmail.com> wrote in message > > >> >>news:1178803190.678798.121650[ at ]y80g2000hsf.googlegroups.com... > > >> >> > On May 10, 2:29 am, "Doug Robbins - Word MVP" > >> >> > <d...[ at ]REMOVECAPSmvps.org> wrote: > >> >> >> Maybe the "Opening This Will Run the Following SQL Command" Message > >> >> >> is > >> >> >> getting in the way. > > >> >> >> See: http://support.microsoft.com?kbid=825765> > >> >> >> -- > >> >> >> 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 > > >> >> >> <sweetguy1o...[ at ]gmail.com> wrote in message > > >> >> >>news:1178766346.338933.162110[ at ]e65g2000hsc.googlegroups.com... > > >> >> >> > Hi all, > > >> >> >> > I am using VBA to create MS Access applications. When my clients > >> >> >> > get > >> >> >> > the application, they are only getting the Access run-time; they > >> >> >> > don't > >> >> >> > need the full version of Access in order to run the application. > >> >> >> > The > >> >> >> > problem that I am having with is, I am using VBA to do a > >> >> >> > mailmerge > >> >> >> > from a recordset in Access to a new word document or existing > >> >> >> > word > >> >> >> > document. This feature works on most of my cleints' machines. > >> >> >> > However, for certain clients, when the word document comes up, > >> >> >> > the > >> >> >> > Insert Merge Fields option in the Mail Merge Toolbar would be > >> >> >> > greyed > >> >> >> > out. For these clients that are having problem, they are all > >> >> >> > using > >> >> >> > Windows XP Professional with MS Word 2003. The weird thing is, I > >> >> >> > have > >> >> >> > Windows XP Professional with MS Word 2003 too but it works for me > >> >> >> > every single time. My codes are as follows, can anyone give me > >> >> >> > some > >> >> >> > pointers on how to correct the problem please? > > >> >> >> > Thanks in advance, > >> >> >> > Monte > > >> >> >> > Set WordApp = CreateObject("Word.Application") > > >> >> >> > If stMergeDoc = "" Then 'Create a new Word doc > > >> >> >> > Set WordDoc = WordApp.Documents.Add > > >> >> >> > Else 'Open the word document selected by the user > > >> >> >> > Set WordDoc = WordApp.Documents.Open(stMergeDoc) > >> >> >> > 'Set objWord = GetObject(stMergeDoc, "Word.Document") > > >> >> >> > End If > > >> >> >> > WordApp.Visible = True > >> >> >> > 'objWord.Application.Visible = True > > >> >> >> > WordDoc.MailMerge.OpenDataSource _ > >> >> >> > Name:=CurrentDb.Name, _ > >> >> >> > LinkToSource:=True, _ > >> >> >> > Connection:="QUERY " & stMergeSrc, _ > >> >> >> > SubType:=wdMergeSubTypeWord2000 > >> >> >> > 'SQLStatement:=strSQL > > >> >> >> > If Err.Number = 448 Then 'they have word 2000, so try > >> >> >> > again > >> >> >> > without the subtype argument > > >> >> >> > WordDoc.MailMerge.OpenDataSource _ > >> >> >> > Name:=CurrentDb.Name, _ > >> >> >> > LinkToSource:=True, _ > >> >> >> > Connection:="QUERY " & stMergeSrc > >> >> >> > End If- Hide quoted text - > > >> >> >> - Show quoted text - > > >> >> > No, my clients don't get that message. However, they do get a > >> >> > message > >> >> > saying Windows has problem starting Microsoft Word.- Hide quoted > >> >> > text - > > >> >> - Show quoted text - > > >> > Thank you very much for your response. > > >> > To answer your question, no, I don't ship any .doc with the software. > >> > It is up to my clients to define their mail templates. > > >> > Most of my clients are not computer savvy at all. Lots of them don't > >> > even know how to copy files from their own desktop to a CD or to a > >> > flash drive. That's the difficult part. If they know something, I > >> > can ask them to try certain thing for me. But since lots of them are > >> > not computer savvy, it may do more harm than good if I were to tell > >> > them to try things.- Hide quoted text - > > >> - Show quoted text - > > > a. Not to my knowledge. The thing is some of my other clients also > > have Windows XP and Office 2003 and they have no problems either. > > Only a few of them are having this problem. > > > b. Yes and it works on my end in the test computer.- Hide quoted text - > > - Show quoted text - Is there a way to set that SQLSecurityCheck value programmatically?
|
|
This is outside my familiar territory, but you can probably do it using a WIn 32 call from VBA, as long as the user who runs the code has permission to make that change. But I don't have code for that. You /should/ be able to provide a .reg file with just the necessary registry keys and values (export one from regedit.exe and you have the starting point for what you need), and either get the user to double-click on that .reg file or find some other way to "execute" it.
Peter Jamieson
<sweetguy1only[ at ]gmail.com> wrote in message news:1179932381.219826.228890[ at ]k79g2000hse.googlegroups.com...
[Quoted Text] > On May 22, 6:16 am, "Peter Jamieson" <p...[ at ]KillmapSpjjnet.demon.co.uk> > wrote: >> Stepping back a bit... >> >> << >> No, my clients don't get that message. However, they do get a message >> saying Windows has problem starting Microsoft Word. >> >> >> >> What is this message exactly? Earlier you were saying that the users >> ended >> up seeing an open document (I think) but with the field dropdwon greyed >> out, >> which suggests that despite a problem starting Word, Access does manage >> to >> do it. >> >> Also, when you are automating Word, you would not typically see the SQL >> message mentioned by Doug. What actually happens is that if the >> SQLSecurityCheck value in the registry is not set appropriately, Word >> silently fails to execute the OpenDataSource - in other words, you >> probably >> still need to get the users to check and alter that registry value - >> which >> may not be easy to do either because they are not technically minded or >> because its against their network admin's policy. But maybe you can check >> that on your own test system? >> >> Peter Jamieson<sweetguy1o...[ at ]gmail.com> wrote in message >> >> news:1179782680.351637.303100[ at ]36g2000prm.googlegroups.com... >> >> >> >> > On May 10, 2:10 pm, "Peter Jamieson" <p...[ at ]KillmapSpjjnet.demon.co.uk> >> > wrote: >> >> OK, so you can't experiment in the client environment. >> >> >> Questions/thoughts: >> >> a. is there any other obvious difference between the client systems >> >> that >> >> work and the ones that don't? Perhaps the systems that do not work are >> >> operating in a more tightly controlled network environemt? That kind >> >> of >> >> thing? Maybe you cannot tell. >> >> b. Do you have a testbed that more accurately reflects a likely >> >> client >> >> environment, e.g. does not have any development tools on it? Perhaps >> >> in a >> >> VM? >> >> >> Peter Jamieson >> >> >> <sweetguy1o...[ at ]gmail.com> wrote in message >> >> >>news:1178823187.954827.195710[ at ]y5g2000hsa.googlegroups.com... >> >> >> > On May 10, 9:36 am, "Peter Jamieson" >> >> > <p...[ at ]KillmapSpjjnet.demon.co.uk> >> >> > wrote: >> >> >> Do you ship a .doc with the connection already made to the correct >> >> >> Access >> >> >> path name - i.e. if they opened the Word .doc in Word directly, >> >> >> would >> >> >> you >> >> >> expect it to be connected to the database? If so, it is worth >> >> >> asking >> >> >> them >> >> >> to >> >> >> try that to see what error message they get. It is probably also >> >> >> worth >> >> >> asking them to connect manually to the query to see what happens - >> >> >> if >> >> >> there >> >> >> is no suitable document, asking /one/ of your clients to try that >> >> >> probably >> >> >> wouldn't be too onerous as long as they are reasonably >> >> >> technically-minded, >> >> >> particularly if you can get them to display the mail merge toolbar. >> >> >> >> Peter Jamieson<sweetguy1o...[ at ]gmail.com> wrote in message >> >> >> >>news:1178803190.678798.121650[ at ]y80g2000hsf.googlegroups.com... >> >> >> >> > On May 10, 2:29 am, "Doug Robbins - Word MVP" >> >> >> > <d...[ at ]REMOVECAPSmvps.org> wrote: >> >> >> >> Maybe the "Opening This Will Run the Following SQL Command" >> >> >> >> Message >> >> >> >> is >> >> >> >> getting in the way. >> >> >> >> >> See: http://support.microsoft.com?kbid=825765>> >> >> >> >> -- >> >> >> >> 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 >> >> >> >> >> <sweetguy1o...[ at ]gmail.com> wrote in message >> >> >> >> >>news:1178766346.338933.162110[ at ]e65g2000hsc.googlegroups.com... >> >> >> >> >> > Hi all, >> >> >> >> >> > I am using VBA to create MS Access applications. When my >> >> >> >> > clients >> >> >> >> > get >> >> >> >> > the application, they are only getting the Access run-time; >> >> >> >> > they >> >> >> >> > don't >> >> >> >> > need the full version of Access in order to run the >> >> >> >> > application. >> >> >> >> > The >> >> >> >> > problem that I am having with is, I am using VBA to do a >> >> >> >> > mailmerge >> >> >> >> > from a recordset in Access to a new word document or existing >> >> >> >> > word >> >> >> >> > document. This feature works on most of my cleints' machines. >> >> >> >> > However, for certain clients, when the word document comes up, >> >> >> >> > the >> >> >> >> > Insert Merge Fields option in the Mail Merge Toolbar would be >> >> >> >> > greyed >> >> >> >> > out. For these clients that are having problem, they are all >> >> >> >> > using >> >> >> >> > Windows XP Professional with MS Word 2003. The weird thing >> >> >> >> > is, I >> >> >> >> > have >> >> >> >> > Windows XP Professional with MS Word 2003 too but it works for >> >> >> >> > me >> >> >> >> > every single time. My codes are as follows, can anyone give >> >> >> >> > me >> >> >> >> > some >> >> >> >> > pointers on how to correct the problem please? >> >> >> >> >> > Thanks in advance, >> >> >> >> > Monte >> >> >> >> >> > Set WordApp = CreateObject("Word.Application") >> >> >> >> >> > If stMergeDoc = "" Then 'Create a new Word doc >> >> >> >> >> > Set WordDoc = WordApp.Documents.Add >> >> >> >> >> > Else 'Open the word document selected by the user >> >> >> >> >> > Set WordDoc = WordApp.Documents.Open(stMergeDoc) >> >> >> >> > 'Set objWord = GetObject(stMergeDoc, >> >> >> >> > "Word.Document") >> >> >> >> >> > End If >> >> >> >> >> > WordApp.Visible = True >> >> >> >> > 'objWord.Application.Visible = True >> >> >> >> >> > WordDoc.MailMerge.OpenDataSource _ >> >> >> >> > Name:=CurrentDb.Name, _ >> >> >> >> > LinkToSource:=True, _ >> >> >> >> > Connection:="QUERY " & stMergeSrc, _ >> >> >> >> > SubType:=wdMergeSubTypeWord2000 >> >> >> >> > 'SQLStatement:=strSQL >> >> >> >> >> > If Err.Number = 448 Then 'they have word 2000, so try >> >> >> >> > again >> >> >> >> > without the subtype argument >> >> >> >> >> > WordDoc.MailMerge.OpenDataSource _ >> >> >> >> > Name:=CurrentDb.Name, _ >> >> >> >> > LinkToSource:=True, _ >> >> >> >> > Connection:="QUERY " & stMergeSrc >> >> >> >> > End If- Hide quoted text - >> >> >> >> >> - Show quoted text - >> >> >> >> > No, my clients don't get that message. However, they do get a >> >> >> > message >> >> >> > saying Windows has problem starting Microsoft Word.- Hide quoted >> >> >> > text - >> >> >> >> - Show quoted text - >> >> >> > Thank you very much for your response. >> >> >> > To answer your question, no, I don't ship any .doc with the >> >> > software. >> >> > It is up to my clients to define their mail templates. >> >> >> > Most of my clients are not computer savvy at all. Lots of them >> >> > don't >> >> > even know how to copy files from their own desktop to a CD or to a >> >> > flash drive. That's the difficult part. If they know something, I >> >> > can ask them to try certain thing for me. But since lots of them >> >> > are >> >> > not computer savvy, it may do more harm than good if I were to tell >> >> > them to try things.- Hide quoted text - >> >> >> - Show quoted text - >> >> > a. Not to my knowledge. The thing is some of my other clients also >> > have Windows XP and Office 2003 and they have no problems either. >> > Only a few of them are having this problem. >> >> > b. Yes and it works on my end in the test computer.- Hide quoted text - >> >> - Show quoted text - > > Is there a way to set that SQLSecurityCheck value programmatically? >
|
|
This should work. Put it in a .reg file, then just double click it. If they have registry editing rights, it will write the key they need into the registry. You can run .reg files programatically.
Windows Registry Editor Version 5.00
[HKEY_CURRENT_USER\Software\Microsoft\Office\11.0\Word\Options] "SQLSecurityCheck"=dword:00000000
dixie
"Peter Jamieson" <pjj[ at ]KillmapSpjjnet.demon.co.uk> wrote in message news:A3727D22-F13F-4449-B662-2A91490E333F[ at ]microsoft.com...
[Quoted Text] > This is outside my familiar territory, but you can probably do it using a > WIn 32 call from VBA, as long as the user who runs the code has permission > to make that change. But I don't have code for that. You /should/ be able > to provide a .reg file with just the necessary registry keys and values > (export one from regedit.exe and you have the starting point for what you > need), and either get the user to double-click on that .reg file or find > some other way to "execute" it. > > Peter Jamieson > > <sweetguy1only[ at ]gmail.com> wrote in message > news:1179932381.219826.228890[ at ]k79g2000hse.googlegroups.com... >> On May 22, 6:16 am, "Peter Jamieson" <p...[ at ]KillmapSpjjnet.demon.co.uk> >> wrote: >>> Stepping back a bit... >>> >>> << >>> No, my clients don't get that message. However, they do get a message >>> saying Windows has problem starting Microsoft Word. >>> >>> >>> >>> What is this message exactly? Earlier you were saying that the users >>> ended >>> up seeing an open document (I think) but with the field dropdwon greyed >>> out, >>> which suggests that despite a problem starting Word, Access does manage >>> to >>> do it. >>> >>> Also, when you are automating Word, you would not typically see the SQL >>> message mentioned by Doug. What actually happens is that if the >>> SQLSecurityCheck value in the registry is not set appropriately, Word >>> silently fails to execute the OpenDataSource - in other words, you >>> probably >>> still need to get the users to check and alter that registry value - >>> which >>> may not be easy to do either because they are not technically minded or >>> because its against their network admin's policy. But maybe you can >>> check >>> that on your own test system? >>> >>> Peter Jamieson<sweetguy1o...[ at ]gmail.com> wrote in message >>> >>> news:1179782680.351637.303100[ at ]36g2000prm.googlegroups.com... >>> >>> >>> >>> > On May 10, 2:10 pm, "Peter Jamieson" <p...[ at ]KillmapSpjjnet.demon.co.uk> >>> > wrote: >>> >> OK, so you can't experiment in the client environment. >>> >>> >> Questions/thoughts: >>> >> a. is there any other obvious difference between the client systems >>> >> that >>> >> work and the ones that don't? Perhaps the systems that do not work >>> >> are >>> >> operating in a more tightly controlled network environemt? That kind >>> >> of >>> >> thing? Maybe you cannot tell. >>> >> b. Do you have a testbed that more accurately reflects a likely >>> >> client >>> >> environment, e.g. does not have any development tools on it? Perhaps >>> >> in a >>> >> VM? >>> >>> >> Peter Jamieson >>> >>> >> <sweetguy1o...[ at ]gmail.com> wrote in message >>> >>> >>news:1178823187.954827.195710[ at ]y5g2000hsa.googlegroups.com... >>> >>> >> > On May 10, 9:36 am, "Peter Jamieson" >>> >> > <p...[ at ]KillmapSpjjnet.demon.co.uk> >>> >> > wrote: >>> >> >> Do you ship a .doc with the connection already made to the correct >>> >> >> Access >>> >> >> path name - i.e. if they opened the Word .doc in Word directly, >>> >> >> would >>> >> >> you >>> >> >> expect it to be connected to the database? If so, it is worth >>> >> >> asking >>> >> >> them >>> >> >> to >>> >> >> try that to see what error message they get. It is probably also >>> >> >> worth >>> >> >> asking them to connect manually to the query to see what happens - >>> >> >> if >>> >> >> there >>> >> >> is no suitable document, asking /one/ of your clients to try that >>> >> >> probably >>> >> >> wouldn't be too onerous as long as they are reasonably >>> >> >> technically-minded, >>> >> >> particularly if you can get them to display the mail merge >>> >> >> toolbar. >>> >>> >> >> Peter Jamieson<sweetguy1o...[ at ]gmail.com> wrote in message >>> >>> >> >>news:1178803190.678798.121650[ at ]y80g2000hsf.googlegroups.com... >>> >>> >> >> > On May 10, 2:29 am, "Doug Robbins - Word MVP" >>> >> >> > <d...[ at ]REMOVECAPSmvps.org> wrote: >>> >> >> >> Maybe the "Opening This Will Run the Following SQL Command" >>> >> >> >> Message >>> >> >> >> is >>> >> >> >> getting in the way. >>> >>> >> >> >> See: http://support.microsoft.com?kbid=825765>>> >>> >> >> >> -- >>> >> >> >> 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 >>> >>> >> >> >> <sweetguy1o...[ at ]gmail.com> wrote in message >>> >>> >> >> >>news:1178766346.338933.162110[ at ]e65g2000hsc.googlegroups.com... >>> >>> >> >> >> > Hi all, >>> >>> >> >> >> > I am using VBA to create MS Access applications. When my >>> >> >> >> > clients >>> >> >> >> > get >>> >> >> >> > the application, they are only getting the Access run-time; >>> >> >> >> > they >>> >> >> >> > don't >>> >> >> >> > need the full version of Access in order to run the >>> >> >> >> > application. >>> >> >> >> > The >>> >> >> >> > problem that I am having with is, I am using VBA to do a >>> >> >> >> > mailmerge >>> >> >> >> > from a recordset in Access to a new word document or existing >>> >> >> >> > word >>> >> >> >> > document. This feature works on most of my cleints' >>> >> >> >> > machines. >>> >> >> >> > However, for certain clients, when the word document comes >>> >> >> >> > up, >>> >> >> >> > the >>> >> >> >> > Insert Merge Fields option in the Mail Merge Toolbar would be >>> >> >> >> > greyed >>> >> >> >> > out. For these clients that are having problem, they are all >>> >> >> >> > using >>> >> >> >> > Windows XP Professional with MS Word 2003. The weird thing >>> >> >> >> > is, I >>> >> >> >> > have >>> >> >> >> > Windows XP Professional with MS Word 2003 too but it works >>> >> >> >> > for me >>> >> >> >> > every single time. My codes are as follows, can anyone give >>> >> >> >> > me >>> >> >> >> > some >>> >> >> >> > pointers on how to correct the problem please? >>> >>> >> >> >> > Thanks in advance, >>> >> >> >> > Monte >>> >>> >> >> >> > Set WordApp = CreateObject("Word.Application") >>> >>> >> >> >> > If stMergeDoc = "" Then 'Create a new Word doc >>> >>> >> >> >> > Set WordDoc = WordApp.Documents.Add >>> >>> >> >> >> > Else 'Open the word document selected by the user >>> >>> >> >> >> > Set WordDoc = WordApp.Documents.Open(stMergeDoc) >>> >> >> >> > 'Set objWord = GetObject(stMergeDoc, >>> >> >> >> > "Word.Document") >>> >>> >> >> >> > End If >>> >>> >> >> >> > WordApp.Visible = True >>> >> >> >> > 'objWord.Application.Visible = True >>> >>> >> >> >> > WordDoc.MailMerge.OpenDataSource _ >>> >> >> >> > Name:=CurrentDb.Name, _ >>> >> >> >> > LinkToSource:=True, _ >>> >> >> >> > Connection:="QUERY " & stMergeSrc, _ >>> >> >> >> > SubType:=wdMergeSubTypeWord2000 >>> >> >> >> > 'SQLStatement:=strSQL >>> >>> >> >> >> > If Err.Number = 448 Then 'they have word 2000, so try >>> >> >> >> > again >>> >> >> >> > without the subtype argument >>> >>> >> >> >> > WordDoc.MailMerge.OpenDataSource _ >>> >> >> >> > Name:=CurrentDb.Name, _ >>> >> >> >> > LinkToSource:=True, _ >>> >> >> >> > Connection:="QUERY " & stMergeSrc >>> >> >> >> > End If- Hide quoted text - >>> >>> >> >> >> - Show quoted text - >>> >>> >> >> > No, my clients don't get that message. However, they do get a >>> >> >> > message >>> >> >> > saying Windows has problem starting Microsoft Word.- Hide quoted >>> >> >> > text - >>> >>> >> >> - Show quoted text - >>> >>> >> > Thank you very much for your response. >>> >>> >> > To answer your question, no, I don't ship any .doc with the >>> >> > software. >>> >> > It is up to my clients to define their mail templates. >>> >>> >> > Most of my clients are not computer savvy at all. Lots of them >>> >> > don't >>> >> > even know how to copy files from their own desktop to a CD or to a >>> >> > flash drive. That's the difficult part. If they know something, I >>> >> > can ask them to try certain thing for me. But since lots of them >>> >> > are >>> >> > not computer savvy, it may do more harm than good if I were to tell >>> >> > them to try things.- Hide quoted text - >>> >>> >> - Show quoted text - >>> >>> > a. Not to my knowledge. The thing is some of my other clients also >>> > have Windows XP and Office 2003 and they have no problems either. >>> > Only a few of them are having this problem. >>> >>> > b. Yes and it works on my end in the test computer.- Hide quoted >>> > text - >>> >>> - Show quoted text - >> >> Is there a way to set that SQLSecurityCheck value programmatically? >> >
|
|
|