Reply
 
Thread Tools Display Modes
  #1   Report Post  
Posted to microsoft.public.word.docmanagement
confused confused is offline
external usenet poster
 
Posts: 12
Default Help with Macros and Templates

I have a 2 template that gets populated by VB code; I want to open
template A then using windows run macro call template B and have
template B inserted as the first page of the template A. I can not
seem to get this to work. My data in template B gets put into
template A right in the middle of my Table of Contents.
  #3   Report Post  
Posted to microsoft.public.word.docmanagement
confused confused is offline
external usenet poster
 
Posts: 12
Default Help with Macros and Templates

On May 10, 8:33*am, Peter A wrote:
In article c664ccb5-8915-4d51-8057-9f81bab08e08
@k13g2000hse.googlegroups.com, says...

I have a 2 template that gets populated by VB code; I want to open
template A then using windows run macro call template B and have
template B inserted as the first page of the template A. *I can not
seem to get this to work. *My data in template B gets put into
template A right in the middle of my Table of Contents.


Why don;t you just make a new Template C that combined A and B? Seems a
lot simpler and would take about 10 seconds.

--
Peter Aitken
Author, MS Word for Medical and Technical Writerswww.tech-word.com


I am doing something wrong, because I cant get this to work, is there
an article that you can point me to?
Is this something like a mater document?
  #4   Report Post  
Posted to microsoft.public.word.docmanagement
confused confused is offline
external usenet poster
 
Posts: 12
Default Help with Macros and Templates

On May 19, 4:48*pm, confused wrote:
On May 10, 8:33*am, Peter A wrote:

In article c664ccb5-8915-4d51-8057-9f81bab08e08
@k13g2000hse.googlegroups.com, says...


I have a 2 template that gets populated by VB code; I want to open
template A then using windows run macro call template B and have
template B inserted as the first page of the template A. *I can not
seem to get this to work. *My data in template B gets put into
template A right in the middle of my Table of Contents.


Why don;t you just make a new Template C that combined A and B? Seems a
lot simpler and would take about 10 seconds.


--
Peter Aitken
Author, MS Word for Medical and Technical Writerswww.tech-word.com


I am doing something wrong, because I cant get this to work, is there
an article that you can point me to?
Is this something like a mater document?


I forgot to include that both templates have their own Header and
Footer, which I need to keep from losing those.
I have tried to use a master document, but I lose the header and
footer from template a when I try putting template b in front (which
is what I want to do)
  #5   Report Post  
Posted to microsoft.public.word.docmanagement
Doug Robbins - Word MVP Doug Robbins - Word MVP is offline
external usenet poster
 
Posts: 8,832
Default Help with Macros and Templates

You would have to show us the code.

--
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

"confused" wrote in message
...
On May 19, 4:48 pm, confused wrote:
On May 10, 8:33 am, Peter A wrote:

In article c664ccb5-8915-4d51-8057-9f81bab08e08
@k13g2000hse.googlegroups.com, says...


I have a 2 template that gets populated by VB code; I want to open
template A then using windows run macro call template B and have
template B inserted as the first page of the template A. I can not
seem to get this to work. My data in template B gets put into
template A right in the middle of my Table of Contents.


Why don;t you just make a new Template C that combined A and B? Seems a
lot simpler and would take about 10 seconds.


--
Peter Aitken
Author, MS Word for Medical and Technical Writerswww.tech-word.com


I am doing something wrong, because I cant get this to work, is there
an article that you can point me to?
Is this something like a mater document?


I forgot to include that both templates have their own Header and
Footer, which I need to keep from losing those.
I have tried to use a master document, but I lose the header and
footer from template a when I try putting template b in front (which
is what I want to do)




  #6   Report Post  
Posted to microsoft.public.word.docmanagement
confused confused is offline
external usenet poster
 
Posts: 12
Default Help with Macros and Templates

On May 20, 6:02*am, "Doug Robbins - Word MVP"
wrote:
You would have to show us the code.

--
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

"confused" wrote in message

...
On May 19, 4:48 pm, confused wrote:





On May 10, 8:33 am, Peter A wrote:


In article c664ccb5-8915-4d51-8057-9f81bab08e08
@k13g2000hse.googlegroups.com, says...


I have a 2 template that gets populated by VB code; I want to open
template A then using windows run macro call template B and have
template B inserted as the first page of the template A. I can not
seem to get this to work. My data in template B gets put into
template A right in the middle of my Table of Contents.


Why don;t you just make a new Template C that combined A and B? Seems a
lot simpler and would take about 10 seconds.


--
Peter Aitken
Author, MS Word for Medical and Technical Writerswww.tech-word.com


I am doing something wrong, because I cant get this to work, is there
an article that you can point me to?
Is this something like a mater document?


I forgot to include that both templates have their own Header and
Footer, which I need to keep from losing those.
I have tried to use a master document, but I lose the header and
footer from template a when I try putting template b in front (which
is what I want to do)- Hide quoted text -

- Show quoted text -


Not sure what code you want to see the code behind the coverpage.dot
or all the code in the DocLiB.dll
I have made serveral attempts and when I open the template 'B' and
want to insert template 'A' behind it, my headings in template 'A' are
no longer there on template 'A' I now have the heading from template
'B'

I really don't have any idea how to fix this.

  #7   Report Post  
Posted to microsoft.public.word.docmanagement
Doug Robbins - Word MVP Doug Robbins - Word MVP is offline
external usenet poster
 
Posts: 8,832
Default Help with Macros and Templates

The code that does the insertion of one "template" into the other.

--
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

"confused" wrote in message
...
On May 20, 6:02 am, "Doug Robbins - Word MVP"
wrote:
You would have to show us the code.

--
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

"confused" wrote in message

...
On May 19, 4:48 pm, confused wrote:





On May 10, 8:33 am, Peter A wrote:


In article c664ccb5-8915-4d51-8057-9f81bab08e08
@k13g2000hse.googlegroups.com, says...


I have a 2 template that gets populated by VB code; I want to open
template A then using windows run macro call template B and have
template B inserted as the first page of the template A. I can not
seem to get this to work. My data in template B gets put into
template A right in the middle of my Table of Contents.


Why don;t you just make a new Template C that combined A and B? Seems
a
lot simpler and would take about 10 seconds.


--
Peter Aitken
Author, MS Word for Medical and Technical Writerswww.tech-word.com


I am doing something wrong, because I cant get this to work, is there
an article that you can point me to?
Is this something like a mater document?


I forgot to include that both templates have their own Header and
Footer, which I need to keep from losing those.
I have tried to use a master document, but I lose the header and
footer from template a when I try putting template b in front (which
is what I want to do)- Hide quoted text -

- Show quoted text -


Not sure what code you want to see the code behind the coverpage.dot
or all the code in the DocLiB.dll
I have made serveral attempts and when I open the template 'B' and
want to insert template 'A' behind it, my headings in template 'A' are
no longer there on template 'A' I now have the heading from template
'B'

I really don't have any idea how to fix this.


  #8   Report Post  
Posted to microsoft.public.word.docmanagement
confused confused is offline
external usenet poster
 
Posts: 12
Default Help with Macros and Templates

On Jun 14, 4:44*am, "Doug Robbins - Word MVP"
wrote:
The code that does the insertion of one "template" into the other.

--
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

"confused" wrote in message

...
On May 20, 6:02 am, "Doug Robbins - Word MVP"





wrote:
You would have to show us the code.


--
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


"confused" wrote in message


....
On May 19, 4:48 pm, confused wrote:


On May 10, 8:33 am, Peter A wrote:


In article c664ccb5-8915-4d51-8057-9f81bab08e08
@k13g2000hse.googlegroups.com, says...


I have a 2 template that gets populated by VB code; I want to open
template A then using windows run macro call template B and have
template B inserted as the first page of the template A. I can not
seem to get this to work. My data in template B gets put into
template A right in the middle of my Table of Contents.


Why don;t you just make a new Template C that combined A and B? Seems
a
lot simpler and would take about 10 seconds.


--
Peter Aitken
Author, MS Word for Medical and Technical Writerswww.tech-word.com


I am doing something wrong, because I cant get this to work, is there
an article that you can point me to?
Is this something like a mater document?


I forgot to include that both templates have their own Header and
Footer, which I need to keep from losing those.
I have tried to use a master document, but I lose the header and
footer from template a when I try putting template b in front (which
is what I want to do)- Hide quoted text -


- Show quoted text -


Not sure what code you want to see the code behind the coverpage.dot
or all the code in the DocLiB.dll
I have made serveral attempts and when I open the template 'B' and
want to insert template 'A' behind it, my headings in template 'A' are
no longer there on template 'A' I now have the heading from template
'B'

I really don't have any idea how to fix this.- Hide quoted text -

- Show quoted text -


Hello;
I finally got the code to work (template "A" inserted into template
"B") , only problem now is pagenation, is there some way to code
opening template "A" in readonly mode then insert into template "B?
When the data is inserted the toc pagenation is off.
Below is how I am inserting template "A" into template "B"

Public Sub Fill(ByRef cW As cWord)
Dim sDoc$, sRoot$, s$

sRoot = (gstrDir & gstrDept & "\Template\")
s = Dir(sRoot, vbNormal)
sDoc = sRoot & s

If sDoc "" Then
DoEvents
nW.GotoBookMark "NewPage"
nW.InsertFile sDoc
End If

End Sub
  #9   Report Post  
Posted to microsoft.public.word.docmanagement
confused confused is offline
external usenet poster
 
Posts: 12
Default Help with Macros and Templates

On Jun 23, 5:22*pm, confused wrote:
On Jun 14, 4:44*am, "Doug Robbins - Word MVP"





wrote:
The code that does the insertion of one "template" into the other.


--
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


"confused" wrote in message


...
On May 20, 6:02 am, "Doug Robbins - Word MVP"


wrote:
You would have to show us the code.


--
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


"confused" wrote in message


....
On May 19, 4:48 pm, confused wrote:


On May 10, 8:33 am, Peter A wrote:


In article c664ccb5-8915-4d51-8057-9f81bab08e08
@k13g2000hse.googlegroups.com, says...


I have a 2 template that gets populated by VB code; I want to open
template A then using windows run macro call template B and have
template B inserted as the first page of the template A. I can not
seem to get this to work. My data in template B gets put into
template A right in the middle of my Table of Contents.


Why don;t you just make a new Template C that combined A and B? Seems
a
lot simpler and would take about 10 seconds.


--
Peter Aitken
Author, MS Word for Medical and Technical Writerswww.tech-word.com


I am doing something wrong, because I cant get this to work, is there
an article that you can point me to?
Is this something like a mater document?


I forgot to include that both templates have their own Header and
Footer, which I need to keep from losing those.
I have tried to use a master document, but I lose the header and
footer from template a when I try putting template b in front (which
is what I want to do)- Hide quoted text -


- Show quoted text -


Not sure what code you want to see the code behind the coverpage.dot
or all the code in the DocLiB.dll
I have made serveral attempts and when I open the template 'B' and
want to insert template 'A' behind it, my headings in template 'A' are
no longer there on template 'A' I now have the heading from template
'B'


I really don't have any idea how to fix this.- Hide quoted text -


- Show quoted text -


Hello;
I finally got the code to work (template "A" inserted into template
"B") , only problem now is pagenation, is there some way to code
opening template "A" in readonly mode then insert into template "B?
When the data is inserted the toc pagenation is off.
Below is how I am inserting template "A" into template "B"

Public Sub Fill(ByRef cW As cWord)
Dim sDoc$, sRoot$, s$

sRoot = (gstrDir & gstrDept & "\Template\")
s = Dir(sRoot, vbNormal)
sDoc = sRoot & s

If sDoc "" Then
* * DoEvents
* * nW.GotoBookMark "NewPage"
* * nW.InsertFile sDoc
End If

End Sub- Hide quoted text -

- Show quoted text -


I got the page renumbering to work, need to tweek the page renumbering
function created; template "A" has 3 first pages and I need to keep
those headers and footer; when template "A" in inserted into template
"B", the headers and footer of the 3 different first pages, keep
changing to template "B" header and footer.
Well thanks for the help, I will just keep working on this on my own.
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
templates with macros Kim K Microsoft Word Help 4 April 20th 08 12:42 AM
Templates and Macros david Microsoft Word Help 1 March 20th 07 08:29 AM
Templates and Macros John Microsoft Word Help 2 June 13th 06 08:52 PM
Saving Templates and Macros ALEX-BEL Microsoft Word Help 0 February 23rd 06 11:37 AM
Macros in templates Wendy Microsoft Word Help 2 April 20th 05 11:57 PM


All times are GMT +1. The time now is 08:09 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"