Reply
 
Thread Tools Display Modes
  #1   Report Post  
Posted to microsoft.public.word.newusers
William Millspaugh William Millspaugh is offline
external usenet poster
 
Posts: 1
Default need code going from one dot to another dot.

Ok, I have 2 word templates, what I am trying to do is this..
One template opened as a "doc", and if a certain cell in the the table is
answered "Yes"(dropdown box), then the code behind this certain cell is
such......

If ActiveDocument.FormFields("DropDown1").result = "Yes" Then
Documents.Add ("TemplateName.dot")
End If


this opens another "dot" as a "doc" so then it can be filled out, then when
this document is filled completely, after the last cell, I would like to go
back to the original document and start where I left off. Can anyone assist
me with some code. If anyone would like to see the 2 "dots" I could send
them. Any help would be appreciated..Bill


  #2   Report Post  
Posted to microsoft.public.word.newusers
Cindy M -WordMVP- Cindy M  -WordMVP- is offline
external usenet poster
 
Posts: 370
Default need code going from one dot to another dot.

Hi William,

The word.vba.beginners group would be more appropriate; this group really is
for end-users.

You are aware that macros trigger only when one exits or enters a form field?

I'd probably use what you show below and add something along these lines
Dim doc2 as Word.Document
Dim myName as String
myName = ActiveDocument.Name
Set doc2 = Documents.Add("templateName.dot")
doc2.Variables("StartDoc").Value = myName
doc2.Activate
'Now the new document is in front

Then, in the procedure that runs when the second document is finished,
something like this
Documents(ActiveDocument.Variables("StartDoc").Val ue).Activate

Ok, I have 2 word templates, what I am trying to do is this..
One template opened as a "doc", and if a certain cell in the the table is
answered "Yes"(dropdown box), then the code behind this certain cell is
such......

If ActiveDocument.FormFields("DropDown1").result = "Yes" Then
Documents.Add ("TemplateName.dot")
End If


this opens another "dot" as a "doc" so then it can be filled out, then when
this document is filled completely, after the last cell, I would like to go
back to the original document and start where I left off. Can anyone assist
me with some code. If anyone would like to see the 2 "dots" I could send
them.


Cindy Meister
INTER-Solutions, Switzerland
http://homepage.swissonline.ch/cindymeister (last update Jun 17 2005)
http://www.word.mvps.org

This reply is posted in the Newsgroup; please post any follow question or reply
in the newsgroup and not by e-mail :-)

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
Can not set column width by code Shaw Tables 1 December 17th 05 07:08 AM
Help! Mailmerge code for all selected records? Kara Mailmerge 1 October 12th 05 07:05 PM
Word Mailmerge does not display a ZIP code beginning with a zero. FredSC Mailmerge 3 August 27th 05 01:07 PM
adding the post code Louise Mailmerge 3 May 4th 05 06:27 PM
How do I use the PRINT field code to ... Dave Microsoft Word Help 3 December 13th 04 03:06 PM


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