Home |
Search |
Today's Posts |
|
#1
Posted to microsoft.public.word.mailmerge.fields
|
|||
|
|||
protect doc?
Hi,
if my doc is wdAllowOnlyFormFields, the .Add method will cause DocumentBeforeClose event to fire, and won't let me open the doc, how to fix this? thanks. ================================================== ============ Set oWordApp = CreateObject("Word.Application") 'New Word.Application Set oWordDocO = oWordApp.Documents.Add(Template:=filename, NewTemplate:=True) |
#2
Posted to microsoft.public.word.mailmerge.fields
|
|||
|
|||
protect doc?
Do you really want to create a new template?
Use Set oWordApp = CreateObject("Word.Application") 'New Word.Application Set oWordDocO = oWordApp.Documents.Add(Template:=filename, NewTemplate:=False) -- 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 "js" wrote in message ... Hi, if my doc is wdAllowOnlyFormFields, the .Add method will cause DocumentBeforeClose event to fire, and won't let me open the doc, how to fix this? thanks. ================================================== ============ Set oWordApp = CreateObject("Word.Application") 'New Word.Application Set oWordDocO = oWordApp.Documents.Add(Template:=filename, NewTemplate:=True) |
#3
Posted to microsoft.public.word.mailmerge.fields
|
|||
|
|||
protect doc?
Thanks Doug,
Can you pls explain more about if NewTemplate:=True, or False what will happen? "Doug Robbins - Word MVP" wrote in message ... Do you really want to create a new template? Use Set oWordApp = CreateObject("Word.Application") 'New Word.Application Set oWordDocO = oWordApp.Documents.Add(Template:=filename, NewTemplate:=False) -- 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 "js" wrote in message ... Hi, if my doc is wdAllowOnlyFormFields, the .Add method will cause DocumentBeforeClose event to fire, and won't let me open the doc, how to fix this? thanks. ================================================== ============ Set oWordApp = CreateObject("Word.Application") 'New Word.Application Set oWordDocO = oWordApp.Documents.Add(Template:=filename, NewTemplate:=True) |
#4
Posted to microsoft.public.word.mailmerge.fields
|
|||
|
|||
protect doc?
It is is set to "True" a new template is created based on the template that
is called by Template:=filename; if it is set to "False" a new document is created based on that template. The latter is what you would normally do. I am assuming that somewhere earlier in your code, the path and name of the template are loaded into the variable "filename". -- 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 wrote in message ... Thanks Doug, Can you pls explain more about if NewTemplate:=True, or False what will happen? "Doug Robbins - Word MVP" wrote in message ... Do you really want to create a new template? Use Set oWordApp = CreateObject("Word.Application") 'New Word.Application Set oWordDocO = oWordApp.Documents.Add(Template:=filename, NewTemplate:=False) -- 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 "js" wrote in message ... Hi, if my doc is wdAllowOnlyFormFields, the .Add method will cause DocumentBeforeClose event to fire, and won't let me open the doc, how to fix this? thanks. ================================================== ============ Set oWordApp = CreateObject("Word.Application") 'New Word.Application Set oWordDocO = oWordApp.Documents.Add(Template:=filename, NewTemplate:=True) |
#5
Posted to microsoft.public.word.mailmerge.fields
|
|||
|
|||
protect doc?
Thanks Doug,
How to get the form items value if the doc is protect? I used strDoc = oWordDocO.Content, but I can't get the item values from content property? Any ways? Please advice. Thanks again. "Doug Robbins - Word MVP" wrote in message ... It is is set to "True" a new template is created based on the template that is called by Template:=filename; if it is set to "False" a new document is created based on that template. The latter is what you would normally do. I am assuming that somewhere earlier in your code, the path and name of the template are loaded into the variable "filename". -- 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 wrote in message ... Thanks Doug, Can you pls explain more about if NewTemplate:=True, or False what will happen? "Doug Robbins - Word MVP" wrote in message ... Do you really want to create a new template? Use Set oWordApp = CreateObject("Word.Application") 'New Word.Application Set oWordDocO = oWordApp.Documents.Add(Template:=filename, NewTemplate:=False) -- 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 "js" wrote in message ... Hi, if my doc is wdAllowOnlyFormFields, the .Add method will cause DocumentBeforeClose event to fire, and won't let me open the doc, how to fix this? thanks. ================================================== ============ Set oWordApp = CreateObject("Word.Application") 'New Word.Application Set oWordDocO = oWordApp.Documents.Add(Template:=filename, NewTemplate:=True) |
#6
Posted to microsoft.public.word.mailmerge.fields
|
|||
|
|||
protect doc?
If the values that you want are in formfields, use the .Result property of
each formfield. -- 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 "js" wrote in message ... Thanks Doug, How to get the form items value if the doc is protect? I used strDoc = oWordDocO.Content, but I can't get the item values from content property? Any ways? Please advice. Thanks again. "Doug Robbins - Word MVP" wrote in message ... It is is set to "True" a new template is created based on the template that is called by Template:=filename; if it is set to "False" a new document is created based on that template. The latter is what you would normally do. I am assuming that somewhere earlier in your code, the path and name of the template are loaded into the variable "filename". -- 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 wrote in message ... Thanks Doug, Can you pls explain more about if NewTemplate:=True, or False what will happen? "Doug Robbins - Word MVP" wrote in message ... Do you really want to create a new template? Use Set oWordApp = CreateObject("Word.Application") 'New Word.Application Set oWordDocO = oWordApp.Documents.Add(Template:=filename, NewTemplate:=False) -- 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 "js" wrote in message ... Hi, if my doc is wdAllowOnlyFormFields, the .Add method will cause DocumentBeforeClose event to fire, and won't let me open the doc, how to fix this? thanks. ================================================== ============ Set oWordApp = CreateObject("Word.Application") 'New Word.Application Set oWordDocO = oWordApp.Documents.Add(Template:=filename, NewTemplate:=True) |
Reply |
Thread Tools | |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Cannot Protect a Mail-Merge Form | Microsoft Word Help | |||
Using Protect Document feature in Word 2003. | Microsoft Word Help | |||
Can't protect my form | Tables | |||
Cannot protect a Word 2003 document | Microsoft Word Help | |||
All I want to do is protect my Word document. Why is XP so diffe. | Microsoft Word Help |