A Microsoft Office (Excel, Word) forum. OfficeFrustration

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.

Go Back   Home » OfficeFrustration forum » Microsoft Word » Mailmerge
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

protect doc?



 
 
Thread Tools Display Modes
  #1  
Old January 9th, 2006, 09:50 PM posted to microsoft.public.word.mailmerge.fields
external usenet poster
 
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  
Old January 10th, 2006, 05:06 AM posted to microsoft.public.word.mailmerge.fields
external usenet poster
 
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  
Old January 10th, 2006, 05:35 AM posted to microsoft.public.word.mailmerge.fields
external usenet poster
 
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  
Old January 10th, 2006, 06:57 AM posted to microsoft.public.word.mailmerge.fields
external usenet poster
 
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  
Old January 25th, 2006, 03:36 PM posted to microsoft.public.word.mailmerge.fields
external usenet poster
 
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  
Old January 25th, 2006, 06:52 PM posted to microsoft.public.word.mailmerge.fields
external usenet poster
 
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  
Old January 25th, 2006, 08:08 PM posted to microsoft.public.word.mailmerge.fields
external usenet poster
 
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  
Old January 25th, 2006, 08:14 PM posted to microsoft.public.word.mailmerge.fields
external usenet poster
 
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  
Old January 26th, 2006, 05:10 AM posted to microsoft.public.word.mailmerge.fields
external usenet poster
 
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)

















 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump

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


All times are GMT +1. The time now is 11:18 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.