Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Pass value of outlook text box to word

Status
Not open for further replies.

psbrown

MIS
Oct 16, 2001
40
I am new to programming and am trying to create a custom report of an outlook form. I have used an example from Sue Moshers book to start me off.
I have created a custom form and a word template. I am trying to pass the contents of a text box on the outlook form to a bookmarked field on the word doc.


A sample of one of the offending lines is:

objDoc.FormFields("MtgDist").Result = _
MtgDist

This does not give any error messages it just does not pass anything.


The whole code is included below with the lines that do not work prefixed with **. Any help would be appreciated.

Private Sub AddMtgData(objDoc)
Dim strValue
objDoc.FormFields("Proj").Result = _
Item.UserProperties("Proj").Value
objDoc.FormFields("ProjPhase").Result = _
Item.UserProperties("Proj. Phase").Value
objDoc.FormFields("MtgType").Result = _
Item.UserProperties("Mtg. Type").Value
objDoc.FormFields("MtgSeq").Result = _
Item.UserProperties("Mtg. Seq.").Value
objDoc.FormFields("MtgDisp").Result = _
Item.UserProperties("Disp").Value
ConvertOLDate(DueDate)
objDoc.FormFields("MtgDate").Result = _
DueDate
** objDoc.FormFields("MtgSubj").Result = _
Subject
** objDoc.FormFields("MtgDist").Result = _
MtgDist
** objDoc.FormFields("MtgAttend").Result = _
MtgAttend
** objDoc.FormFields("MtgApol").Result = _
MtgApol
objDoc.FormFields("MtgNotes").Result = _
Replace(Item.Body, vbCrLf, " ")

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top