Reply
 
Thread Tools Display Modes
  #1   Report Post  
Posted to microsoft.public.word.docmanagement
Mary Bray Mary Bray is offline
external usenet poster
 
Posts: 2
Default Document based on a template tries to save as the template

Good morning,

I have an issue with Word 2003. I have built a number of templates that fire
code in the Document_New() sub to connect to a SQL database and fill in
values of a bunch of bookmarks.

If I have a copy of the template open (say Fred.dot), and then open a new
document based on the template all works correctly and I am propmpted to save
Document2 (or 3, 4 etc) when i go to close the new document.

If the template is not open, and I open a new document based on it the code
runs and gets the data (have used message boxes to confirm this) and bounces
round the bookmarks but does not write the data to the document. When I go to
close it I am prompted to save Fred.dot instead of Document2 (or 3, 4 etc).

Any ideas?


  #2   Report Post  
Posted to microsoft.public.word.docmanagement
Summer Summer is offline
external usenet poster
 
Posts: 333
Default Document based on a template tries to save as the template

It would be more helpful to post your code in appropriate
Microsoft.public.word.vba.general and beginners groups for this problem.


"Mary Bray" wrote in message
news
Good morning,

I have an issue with Word 2003. I have built a number of templates that
fire
code in the Document_New() sub to connect to a SQL database and fill in
values of a bunch of bookmarks.

If I have a copy of the template open (say Fred.dot), and then open a new
document based on the template all works correctly and I am propmpted to
save
Document2 (or 3, 4 etc) when i go to close the new document.

If the template is not open, and I open a new document based on it the
code
runs and gets the data (have used message boxes to confirm this) and
bounces
round the bookmarks but does not write the data to the document. When I go
to
close it I am prompted to save Fred.dot instead of Document2 (or 3, 4
etc).

Any ideas?




  #3   Report Post  
Posted to microsoft.public.word.docmanagement
Mary Bray Mary Bray is offline
external usenet poster
 
Posts: 2
Default Document based on a template tries to save as the template

That's not terribly helpful. I considered the vba group (it is definitely not
a Beginner issue), but the problem seemed more related to the way a template
was opening rather than any code inside. I have never been in favor of
cross-posting as it tends to waste peoples time.

"Summer" wrote:

It would be more helpful to post your code in appropriate
Microsoft.public.word.vba.general and beginners groups for this problem.


"Mary Bray" wrote in message
news
Good morning,

I have an issue with Word 2003. I have built a number of templates that
fire
code in the Document_New() sub to connect to a SQL database and fill in
values of a bunch of bookmarks.

If I have a copy of the template open (say Fred.dot), and then open a new
document based on the template all works correctly and I am propmpted to
save
Document2 (or 3, 4 etc) when i go to close the new document.

If the template is not open, and I open a new document based on it the
code
runs and gets the data (have used message boxes to confirm this) and
bounces
round the bookmarks but does not write the data to the document. When I go
to
close it I am prompted to save Fred.dot instead of Document2 (or 3, 4
etc).

Any ideas?





  #4   Report Post  
Posted to microsoft.public.word.docmanagement
Summer Summer is offline
external usenet poster
 
Posts: 333
Default Document based on a template tries to save as the template

Mary, Documents.Add("Fred.dot")with path if on server."Mary Bray"
wrote in message
... That's not
terribly helpful. I considered the vba group (it is definitely not
a Beginner issue), but the problem seemed more related to the way a
template
was opening rather than any code inside. I have never been in favor of
cross-posting as it tends to waste peoples time.

"Summer" wrote:

It would be more helpful to post your code in appropriate
Microsoft.public.word.vba.general and beginners groups for this problem.


"Mary Bray" wrote in message
news
Good morning,

I have an issue with Word 2003. I have built a number of templates that
fire
code in the Document_New() sub to connect to a SQL database and fill in
values of a bunch of bookmarks.

If I have a copy of the template open (say Fred.dot), and then open a
new
document based on the template all works correctly and I am propmpted
to
save
Document2 (or 3, 4 etc) when i go to close the new document.

If the template is not open, and I open a new document based on it the
code
runs and gets the data (have used message boxes to confirm this) and
bounces
round the bookmarks but does not write the data to the document. When I
go
to
close it I am prompted to save Fred.dot instead of Document2 (or 3, 4
etc).

Any ideas?







  #5   Report Post  
Posted to microsoft.public.word.docmanagement
Graham Mayor Graham Mayor is offline
external usenet poster
 
Posts: 19,312
Default Document based on a template tries to save as the template

You expect someone to troubleshoot your code when you don't tell us what it
is? That's not very helpful either. The place for code related problems is
one of the the vba forums.

If you wish to post to more than one newsgroup, then put all the groups in
the same 'send-to' line separated by commas. This links the messages and
minimizes duplication of effort by those who respond to questions.

Whether you can do this from the web forums I hesitate to say, but you
certainly can from usenet - http://www.gmayor.com/MSNews.htm


--

Graham Mayor - Word MVP

My web site www.gmayor.com
Word MVP web site http://word.mvps.org


Mary Bray wrote:
That's not terribly helpful. I considered the vba group (it is
definitely not a Beginner issue), but the problem seemed more related
to the way a template was opening rather than any code inside. I have
never been in favor of cross-posting as it tends to waste peoples
time.

"Summer" wrote:

It would be more helpful to post your code in appropriate
Microsoft.public.word.vba.general and beginners groups for this
problem.


"Mary Bray" wrote in message
news
Good morning,

I have an issue with Word 2003. I have built a number of templates
that fire
code in the Document_New() sub to connect to a SQL database and
fill in values of a bunch of bookmarks.

If I have a copy of the template open (say Fred.dot), and then open
a new document based on the template all works correctly and I am
propmpted to save
Document2 (or 3, 4 etc) when i go to close the new document.

If the template is not open, and I open a new document based on it
the code
runs and gets the data (have used message boxes to confirm this) and
bounces
round the bookmarks but does not write the data to the document.
When I go to
close it I am prompted to save Fred.dot instead of Document2 (or 3,
4 etc).

Any ideas?





  #6   Report Post  
Posted to microsoft.public.word.docmanagement
Suzanne S. Barnhill Suzanne S. Barnhill is offline
external usenet poster
 
Posts: 33,624
Default Document based on a template tries to save as the template

What Summer failed to say is that this is an end-user NG (indeed, since it
is billed as General Questions in the Web portal from which you posted, it
is the ultimate end-user NG), and you are less likely to find VBA help here
than in one of the microsoft.public.word.vba hierarchy of NGs.

--
Suzanne S. Barnhill
Microsoft MVP (Word)
Words into Type
Fairhope, Alabama USA
Word MVP FAQ site: http://word.mvps.org
Email cannot be acknowledged; please post all follow-ups to the newsgroup so
all may benefit.

"Mary Bray" wrote in message
...
That's not terribly helpful. I considered the vba group (it is definitely

not
a Beginner issue), but the problem seemed more related to the way a

template
was opening rather than any code inside. I have never been in favor of
cross-posting as it tends to waste peoples time.

"Summer" wrote:

It would be more helpful to post your code in appropriate
Microsoft.public.word.vba.general and beginners groups for this problem.


"Mary Bray" wrote in message
news
Good morning,

I have an issue with Word 2003. I have built a number of templates

that
fire
code in the Document_New() sub to connect to a SQL database and fill

in
values of a bunch of bookmarks.

If I have a copy of the template open (say Fred.dot), and then open a

new
document based on the template all works correctly and I am propmpted

to
save
Document2 (or 3, 4 etc) when i go to close the new document.

If the template is not open, and I open a new document based on it the
code
runs and gets the data (have used message boxes to confirm this) and
bounces
round the bookmarks but does not write the data to the document. When

I go
to
close it I am prompted to save Fred.dot instead of Document2 (or 3, 4
etc).

Any ideas?






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
Document based on Template Printing Blank Pages AngMoren Microsoft Word Help 2 June 26th 06 05:01 PM
How do I get a new document based on my template to open in view i Pamela Microsoft Word Help 1 April 10th 06 05:26 AM
text form field in document (based on template) Dan Microsoft Word Help 2 October 19th 05 05:07 PM
Autoopen of Properties box on opening document based on a template Jørund Microsoft Word Help 1 September 27th 05 11:26 PM
open document based on a template ties up that template Tim Wallin Microsoft Word Help 1 April 8th 05 10:49 PM


All times are GMT +1. The time now is 03:14 PM.

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"