Reply
 
Thread Tools Display Modes
  #1   Report Post  
Posted to microsoft.public.word.mailmerge.fields
Evan Putranto Evan Putranto is offline
external usenet poster
 
Posts: 6
Default Word Field Type - Fill In Prompt Problem (Word Insert Field in

Hi Peter,

That works. Thank you very much for your help. I really appreciate it.

Regards,
Evan

"Peter Jamieson" wrote:

Yes, I could have sworn you could make it work that way. But maybe not.

Anyway, I think the following will give you what you need except you may
need to set the field code view how you want it at the end:

Sub insfillin()
Dim f As Field
Const sPromptText = "SOME TEXT"
Dim strDefaultText As String
strDefaultText = Chr(34) & "SOME DEFAULT VALUE" & Chr(34)
Set f = ActiveDocument.Fields.Add(Selection.Range, wdFieldQuote,
strDefaultText, False)
' you should not need the next line...
'f.Update
f.Code.Text = " FILLIN " & Chr(34) & sPromptText & Chr(34) & "\d " &
strDefaultText & " "
End Sub


--
Peter Jamieson
http://tips.pjmsn.me.uk

"Evan Putranto" wrote in message
...
Hi Peter,

Thx for your reply. I know what you mean.
This is what I need Peter using vb syntax:

During

ActiveWindow.View.ShowFieldCodes = True

The following will be shown:
{ FILLIN "SOME TEXT" \d "SOME DEFAULT VALUE" }

During

ActiveWindow.View.ShowFieldCodes = False

The following will be shown:
SOME DEFAULT VALUE

But I need to achieve this without prompting the user.
Is that possible?

Currently during

ActiveWindow.View.ShowFieldCodes = True

it shows

{ FILLIN "SOME TEXT" \d "SOME DEFAULT VALUE" } SOME DEFAULT VALUE

Thank you again for your help.

Regards,
Evan



Reply
Thread Tools
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Insert Merge Field problem with Word-Mail Merge from Excel documen Augusta E. Microsoft Word Help 2 June 20th 05 10:59 AM
Mail merge field different in datasource & insert a field menu Silvs Mailmerge 1 April 22nd 05 06:18 AM
Can I insert some type of field into a Word form that allows the . [email protected] Microsoft Word Help 3 March 31st 05 07:50 AM
Prompt user to fill in drop down field when document opens DGjr. Microsoft Word Help 1 February 28th 05 08:13 PM
Fill-in field - returning to a previous field. Lorrie Mailmerge 1 December 13th 04 07:39 PM


All times are GMT +1. The time now is 08:54 PM.

Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 Microsoft Office Word Forum - WordBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Word"