Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
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. |
#2
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
Help with Macros and Templates
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 Writers www.tech-word.com |
#3
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
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
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
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
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
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
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
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
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
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
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
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
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
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 | |
|
|
Similar Threads | ||||
Thread | Forum | |||
templates with macros | Microsoft Word Help | |||
Templates and Macros | Microsoft Word Help | |||
Templates and Macros | Microsoft Word Help | |||
Saving Templates and Macros | Microsoft Word Help | |||
Macros in templates | Microsoft Word Help |