> Hello!
>
[quoted text clipped - 10 lines]
> Firstly then: is there a way that this can be done with VBA or
> Macro's?
VBA and macros are the same thing. You could either put all three paragraphs
in the letter template, each defined by a bookmark. Then according to policy
type delete the two you don't want. Or, define the three paragraphs as
Autotext entries and insert the one you want.
> Also, within the paragraphs there are "variables" that need to be
> entered using a userform. Normally I would enter a bookmark in the
[quoted text clipped - 3 lines]
> be included in the code? Or is there another way that's completely
> different?
If you use method 1 you still can use bookmarks; but a better approach is to
use custom document properties. In code, set the value by setting the
property value. In the document, use a DocProperty field where you want the
value to appear. This will work with either of the paragraph methods, since
Autotext entries may include fields.
> Many thanks in advance for anyone who can help - my lecturer for this
> module stunned me today when she told me she had "limited" knowledge
> about visual basic, yet this assignment is all about VBA!!!!
Adi - 02 Nov 2004 22:06 GMT
Many thanks for the speedy reply to my problem - I can now see light
at the end of the tunnel!
I'm sorry to call on your expertise again, but I am a "newbie" to VBA
and I know more than my lecturer so no help there!
I will go with your first method as it seems the simplist but can you
tell me what the code is for deleting the paragraphs please? I have
tried searching newsgroups and web pages and reading up in books for
the answer but I can't seem to find it!
Again, my humble thanks for yours and anybody else's help!!
> > Hello!
> >
[quoted text clipped - 33 lines]
> > module stunned me today when she told me she had "limited" knowledge
> > about visual basic, yet this assignment is all about VBA!!!!
Jezebel - 02 Nov 2004 22:14 GMT
If you have a bookmark called "Par1", then this deletes whatever the
bookmark refers to --
ActiveDocument.Bookmarks("Par1").Range.Delete
> Many thanks for the speedy reply to my problem - I can now see light
> at the end of the tunnel!
[quoted text clipped - 46 lines]
> > > module stunned me today when she told me she had "limited" knowledge
> > > about visual basic, yet this assignment is all about VBA!!!!