Thread: [Solved] buttons to import a picture
View Single Post
 
Old 10-09-2012, 11:32 AM
Staind Staind is offline Windows 7 64bit Office 2010 64bit
Novice
 
Join Date: Oct 2012
Posts: 1
Staind is on a distinguished road
Default

Hi,

So I created the fixed-size field for the picture in a form with drop down lists and text fields. I also created a command button to reset all the drop down and fields back to blank at click, which works beautifully. However, I'm struggling with resetting the picture content form field. Can you help me with a code for the command button that will 'reset' the picture content form field back to 'blank'?

Just FYI, the current code for the reset command button is:

Code:
Sub CommandButton1_Click()
Dim oFF As FormField
For Each oFF In ActiveDocument.Range.FormFields
  Select Case oFF.Type
    Case Is = wdFieldFormTextInput
      oFF.Result = ""
    Case Is = wdFieldFormDropDown
      oFF.DropDown.Value = 1
    Case Is = wdFieldFormCheckBox
      oFF.Result = False
  End Select
Next oFF
End Sub
Thanks so much in advance!



EDIT: I realized that this question might be more apt in the Word VBA box, but since there's a thread on picture content form field, I thought I'd ask it here

Last edited by macropod; 10-09-2012 at 03:09 PM. Reason: Added code tags and formatting
Reply With Quote