Getting the value from the useform into my document

S

Steve_WORD

Hi,
I am familiar with VBA in Excel but would like some help getting
started in VBA for Word
I created a for with the DT Picker control on it but would like to know
how to go about coding it to put the value from this form after picking
the date in the word doc.
I am not sure if I am wrong on this but I have an idea that I must used
a bookmark for where the date must appear in the doc. Is this correct?
Some sample coding for the DT Picker would be very useful?
Thanks in Advance
Steve
 
J

Jean-Guy Marcil

Steve_WORD was telling us:
Steve_WORD nous racontait que :
Hi,
I am familiar with VBA in Excel but would like some help getting
started in VBA for Word
I created a for with the DT Picker control on it but would like to
know how to go about coding it to put the value from this form after
picking the date in the word doc.
I am not sure if I am wrong on this but I have an idea that I must
used a bookmark for where the date must appear in the doc. Is this
correct? Some sample coding for the DT Picker would be very useful?
Thanks in Advance

Once you have created a bookmark in the document (named "DT_Date" in my
example) I guess you could use something like:

ActiveDocument.Bookmarks("DT_Date").Range.Text = _
Format(Me.DT_Control.Value, "dddd, mmm d yyyy")

--
Salut!
_______________________________________
Jean-Guy Marcil - Word MVP
(e-mail address removed)
Word MVP site: http://www.word.mvps.org
 
J

Jonathan West

Steve_WORD said:
Hi,
I am familiar with VBA in Excel but would like some help getting
started in VBA for Word
I created a for with the DT Picker control on it but would like to know
how to go about coding it to put the value from this form after picking
the date in the word doc.
I am not sure if I am wrong on this but I have an idea that I must used
a bookmark for where the date must appear in the doc. Is this correct?
Some sample coding for the DT Picker would be very useful?
Thanks in Advance
Steve

Answered in beginners group. Please don't post separate copies of the same
question into different groups

--
Regards
Jonathan West - Word MVP
www.intelligentdocuments.co.uk
Please reply to the newsgroup
Keep your VBA code safe, sign the ClassicVB petition www.classicvb.org
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top