If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
Mail Merge & Protected Form (Doug Robbins Code)
I was pointed to Doug Robbins code at
(http://www.gmayor.com/Form_Fields_and_Mail_Merge.htm) which looks to do exactly what I need however I'm getting an error when the macro runs which is a 9 Subscript out of range error (see attached screenshot). The scenario is that I have a form with quite a few tick boxes and text fields in it but I want to populate the form title and address of the recipient similar to Doug's Example. Once populated I then want to protect the form and tick the relevant check boxes before printing etc (again similar to Doug's example). I have saved the form as a macro enabled word template, with an attached data source and relevant mail merge fields in the correct places, plus my checkboxes (the form is unprotected at this point as I can see the mail merge results and word 2007 wont let you protect a form if it contains any mail merge fields). I then open a new document based on this template and manually run Doug's code which prompts me for a password which I click OK for (and leave blank as I don't need one). A couple of seconds later I get the subscript error with no break in the code so I can't see where it is failing. If I click ok to the error message and examine the document it seems to be ok? Should I be seeing this error? -- Regards Andy Andy Roberts Win XP, Office 2007 |
#2
|
|||
|
|||
Mail Merge & Protected Form (Doug Robbins Code)
Send a copy of the template to dkr[atsymbol]mvps[dot]org and I will have a
look at it. -- 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, originally posted via msnews.microsoft.com "Andy Roberts" wrote in message ... I was pointed to Doug Robbins code at (http://www.gmayor.com/Form_Fields_and_Mail_Merge.htm) which looks to do exactly what I need however I'm getting an error when the macro runs which is a 9 Subscript out of range error (see attached screenshot). The scenario is that I have a form with quite a few tick boxes and text fields in it but I want to populate the form title and address of the recipient similar to Doug's Example. Once populated I then want to protect the form and tick the relevant check boxes before printing etc (again similar to Doug's example). I have saved the form as a macro enabled word template, with an attached data source and relevant mail merge fields in the correct places, plus my checkboxes (the form is unprotected at this point as I can see the mail merge results and word 2007 wont let you protect a form if it contains any mail merge fields). I then open a new document based on this template and manually run Doug's code which prompts me for a password which I click OK for (and leave blank as I don't need one). A couple of seconds later I get the subscript error with no break in the code so I can't see where it is failing. If I click ok to the error message and examine the document it seems to be ok? Should I be seeing this error? -- Regards Andy Andy Roberts Win XP, Office 2007 |
#3
|
|||
|
|||
Mail Merge & Protected Form (Doug Robbins Code)
Thanks Doug
Email sent -- Regards Andy Andy Roberts Win XP, Office 2007 "Doug Robbins - Word MVP" wrote in message ... Send a copy of the template to dkr[atsymbol]mvps[dot]org and I will have a look at it. -- 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, originally posted via msnews.microsoft.com "Andy Roberts" wrote in message ... I was pointed to Doug Robbins code at (http://www.gmayor.com/Form_Fields_and_Mail_Merge.htm) which looks to do exactly what I need however I'm getting an error when the macro runs which is a 9 Subscript out of range error (see attached screenshot). The scenario is that I have a form with quite a few tick boxes and text fields in it but I want to populate the form title and address of the recipient similar to Doug's Example. Once populated I then want to protect the form and tick the relevant check boxes before printing etc (again similar to Doug's example). I have saved the form as a macro enabled word template, with an attached data source and relevant mail merge fields in the correct places, plus my checkboxes (the form is unprotected at this point as I can see the mail merge results and word 2007 wont let you protect a form if it contains any mail merge fields). I then open a new document based on this template and manually run Doug's code which prompts me for a password which I click OK for (and leave blank as I don't need one). A couple of seconds later I get the subscript error with no break in the code so I can't see where it is failing. If I click ok to the error message and examine the document it seems to be ok? Should I be seeing this error? -- Regards Andy Andy Roberts Win XP, Office 2007 |
#4
|
|||
|
|||
Mail Merge & Protected Form (Doug Robbins Code)
Doug
Can you cc the feedback to me please? -- Graham Mayor - Word MVP My web site www.gmayor.com Word MVP web site http://word.mvps.org "Doug Robbins - Word MVP" wrote in message ... Send a copy of the template to dkr[atsymbol]mvps[dot]org and I will have a look at it. -- 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, originally posted via msnews.microsoft.com "Andy Roberts" wrote in message ... I was pointed to Doug Robbins code at (http://www.gmayor.com/Form_Fields_and_Mail_Merge.htm) which looks to do exactly what I need however I'm getting an error when the macro runs which is a 9 Subscript out of range error (see attached screenshot). The scenario is that I have a form with quite a few tick boxes and text fields in it but I want to populate the form title and address of the recipient similar to Doug's Example. Once populated I then want to protect the form and tick the relevant check boxes before printing etc (again similar to Doug's example). I have saved the form as a macro enabled word template, with an attached data source and relevant mail merge fields in the correct places, plus my checkboxes (the form is unprotected at this point as I can see the mail merge results and word 2007 wont let you protect a form if it contains any mail merge fields). I then open a new document based on this template and manually run Doug's code which prompts me for a password which I click OK for (and leave blank as I don't need one). A couple of seconds later I get the subscript error with no break in the code so I can't see where it is failing. If I click ok to the error message and examine the document it seems to be ok? Should I be seeing this error? -- Regards Andy Andy Roberts Win XP, Office 2007 |
Thread Tools | |
Display Modes | |
|
|