View Single Post
  #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 :-)