Microsoft Office Forums Issue Using FormFields.Result

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 04-04-2017, 12:54 PM
boCash boCash is offline Issue Using FormFields.Result Windows 8 Issue Using FormFields.Result Office 2010 64bit
Novice
Issue Using FormFields.Result
 
Join Date: Apr 2017
Posts: 1
boCash is on a distinguished road
Default Issue Using FormFields.Result

Hey all,



I have a form field, let's call it "myIndex", that I would like to grab the contents of.

Can anyone explain why this code functions properly:
Code:
Sub test()
     MsgBox ActiveDocument.FormFields("myIndex").Result
End Sub
But this code throws an object required error:
Code:
Sub test()
    Dim myString As String
    Set myString = ActiveDocument.FormFields("myIndex").Result
End Sub
I'm going nuts trying to figure out why this isn't working.


Quote:
Edit: Figured it out, I needed to remove the Set before myString.

Last edited by boCash; 04-04-2017 at 01:01 PM. Reason: Solved
Reply With Quote
Reply

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
Updating/Locking FormFields Maskot Word VBA 4 06-24-2015 04:40 AM
Issue Using FormFields.Result Result Calculator Raza Excel Programming 7 01-26-2015 11:35 PM
Issue Using FormFields.Result Mailmerge and Formfields Liosis Mail Merge 4 03-07-2014 12:56 PM
Renaming Word Formfields: string too long error silverspr Word VBA 7 01-22-2013 06:20 PM
Issue Using FormFields.Result How can I get the conditional result? Learner7 Excel 1 02-02-2011 03:16 AM


All times are GMT -7. The time now is 08:30 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2019, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2019 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft