Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Word / Mailmerge and Fax / June 2004

Tip: Looking for answers? Try searching our database.

How to create the brackets of the Field-Functions?

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Uwe Suedbeck - 01 Jun 2004 11:41 GMT
I want to create e Field including a Picture in my Mailmerge, but when i try
to create the brackets Word uses to interprete the Functions, in my
Range-Object, Word does not Understand this bracket and draws a simple "{"
or "}" but doesn?t interpretes them.

How can i create this brackets in my vb-code??
Doug Robbins - Word MVP - 01 Jun 2004 11:48 GMT
The following examples are from the Visual Basic Help file

This example inserts a USERNAME field at the beginning of the selection.

Selection.Collapse Direction:=wdCollapseStart
Set myField = ActiveDocument.Fields.Add(Range:=Selection.Range, _
   Type:=wdFieldUserName)

This example inserts a LISTNUM field at the end of the selection. The
starting switch is set to begin at 3.

Selection.Collapse Direction:=wdCollapseEnd
ActiveDocument.Fields.Add Range:=Selection.Range, _
   Type:=wdFieldListNum, Text:="\s 3"

This example inserts a DATE field at the beginning of the selection and then
displays the result.

Selection.Collapse Direction:=wdCollapseStart
Set myField = ActiveDocument.Fields.Add(Range:=Selection.Range, _
   Type:=wdFieldDate)
MsgBox myField.Result

Signature

Please post any further questions or followup to the newsgroups for the
benefit of others who may be interested.  Unsolicited questions forwarded
directly to me will only be answered on a paid consulting basis.

Hope this helps
Doug Robbins - Word MVP

> I want to create e Field including a Picture in my Mailmerge, but when i try
> to create the brackets Word uses to interprete the Functions, in my
> Range-Object, Word does not Understand this bracket and draws a simple "{"
> or "}" but doesn´t interpretes them.
>
> How can i create this brackets in my vb-code??
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.