Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Thread Tools Display Modes
Old 04-04-2017, 12:54 PM
boCash boCash is offline Issue Using FormFields.Result Windows 8 Issue Using FormFields.Result Office 2010 64bit
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:
Sub test()
     MsgBox ActiveDocument.FormFields("myIndex").Result
End Sub
But this code throws an object required error:
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.

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

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

Other Forums: Access Forums - Senior Forums

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

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