|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
Stop making mediocre tutorials.The best tutorials are video! Camtasia Studio makes it easy to create engaging, buzz-building screen videos at any size, in any popular format. Download the free trial!
|
|
#1
|
|||
|
|||
|
Writing to bookmarked fields
Need some help writing to bookmarked fields from VB to MSWord.
More specifically - I have bookmarked fields in a MS Word document and I need to write to these fields via ADO. Is the following the only way to accomplish this task? myDoc.Bookmarks("field1").Select Selection.Text = Trim(rs("field1").Value) I'm sure there is a better way to handle this, I'm new at this vba stuff so bare with me. Thanks in advance. |
|
#2
|
|||
|
|||
|
Writing to a bookmarked field
Or is this a better way to handle writing to a bookmarked field?
myDoc.Variables("field1").Value = Trim(rs("field1").Value) |
|
#3
|
|||
|
|||
|
To answer this question, I guess I figured it out myself.
myDoc.Bookmarks("field1").Select Selection.Text = Trim(rs("field1").Value) Seems to be the most effective way to handle this. |
![]() |
| Viewing: Dev Shed Forums > Programming Languages - More > Visual Basic Programming > Writing to bookmarked fields |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|