#1   Report Post  
Posted to microsoft.public.word.mailmerge.fields
js
 
Posts: n/a
Default 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   Report Post  
Posted to microsoft.public.word.mailmerge.fields
Doug Robbins - Word MVP
 
Posts: n/a
Default 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   Report Post  
Posted to microsoft.public.word.mailmerge.fields
 
Posts: n/a
Default 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   Report Post  
Posted to microsoft.public.word.mailmerge.fields
Doug Robbins - Word MVP
 
Posts: n/a
Default 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   Report Post  
Posted to microsoft.public.word.mailmerge.fields
js
 
Posts: n/a
Default 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   Report Post  
Posted to microsoft.public.word.mailmerge.fields
Doug Robbins - Word MVP
 
Posts: n/a
Default 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   Report Post  
Posted to microsoft.public.word.mailmerge.fields
js
 
Posts: n/a
Default 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   Report Post  
Posted to microsoft.public.word.mailmerge.fields
js
 
Posts: n/a
Default 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   Report Post  
Posted to microsoft.public.word.mailmerge.fields
Doug Robbins - Word MVP
 
Posts: n/a
Default 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)

















Reply
Thread Tools
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Cannot Protect a Mail-Merge Form DaveDVF Microsoft Word Help 3 October 27th 05 07:03 PM
Using Protect Document feature in Word 2003. Mike Microsoft Word Help 2 September 27th 05 01:52 PM
Can't protect my form BCBC Tables 2 May 17th 05 09:18 PM
Cannot protect a Word 2003 document Eric Hale Microsoft Word Help 1 March 8th 05 11:42 PM
All I want to do is protect my Word document. Why is XP so diffe. I Hate Computers Microsoft Word Help 3 January 13th 05 09:56 PM


All times are GMT +1. The time now is 01:31 AM.

Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 Microsoft Office Word Forum - WordBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Word"