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
|
|||
|
|||
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
|
|||
|
|||
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
|
|||
|
|||
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
|
|||
|
|||
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
|
|||
|
|||
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
|
|||
|
|||
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) |
#7
|
|||
|
|||
protect doc?
Thanks Doug,
where is the .Result property, is it for oWordDocO.Content? How to get it? "Doug Robbins - Word MVP" wrote in message ... 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) |
#8
|
|||
|
|||
protect doc?
Thanks for the help.
How to how where (the position of the form in original doc) to output the formfields? for example, oWordDocO.Content only return the text, is it only way just append the formfields at the end of the content? I want to get the original layout as well, oWordDocO.Content + formfields in they original position? is it possible? "Doug Robbins - Word MVP" wrote in message ... 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) |
#9
|
|||
|
|||
protect doc?
Please explain exactly what it is that you are trying to do so that you will
get the most appropriate advice. -- 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 for the help. How to how where (the position of the form in original doc) to output the formfields? for example, oWordDocO.Content only return the text, is it only way just append the formfields at the end of the content? I want to get the original layout as well, oWordDocO.Content + formfields in they original position? is it possible? "Doug Robbins - Word MVP" wrote in message ... 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) |
Thread Tools | |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Protect Workbook vs Worksheet?? | Dan B | Worksheet Functions | 3 | November 7th, 2005 09:02 PM |
Cannot Protect Document | BARKAROO | General Discussion | 1 | May 6th, 2005 06:40 PM |
All I want to do is protect my Word document. Why is XP so diffe. | I Hate Computers | General Discussion | 3 | January 13th, 2005 09:56 PM |
How Protect chart source links but allow change font and colors etc? | Gunnar Johansson | Charts and Charting | 1 | November 1st, 2004 03:09 AM |
Excel - protect sheet vs. protect workbook | DirtbykeDiva | General Discussion | 3 | September 1st, 2004 02:10 AM |