Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 08-20-2014, 12:40 PM
zacam87 zacam87 is offline Check Box Form Field Book Mark Auto Fill? Windows 7 64bit Check Box Form Field Book Mark Auto Fill? Office 2010 32bit
Novice
Check Box Form Field Book Mark Auto Fill?
 
Join Date: Aug 2014
Posts: 3
zacam87 is on a distinguished road
Default Check Box Form Field Book Mark Auto Fill?


Hi,

I'm wondering if there is a way to auto-fill all check box form field bookmarks (in field settings) in a document? I have a document template with about 3,500 check box form fields, and I'm trying to write a macro in Excel to auto populate an Excel sheet based off of which check boxes are marked. I don't really care what the actual bookmark names are, but each one does need to be unique. If possible I'd like to use numbers 1 - 3,500 but I don't think that's possible.




Thanks!
Z
Reply With Quote
  #2  
Old 08-20-2014, 01:42 PM
macropod's Avatar
macropod macropod is offline Check Box Form Field Book Mark Auto Fill? Windows 7 64bit Check Box Form Field Book Mark Auto Fill? Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 21,962
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

Your post is unclear.

First you say you want to "auto-fill all check box form field bookmarks (in field settings) in a document", but checkboxes only have true/false states.

Then you say you want to "write a macro in Excel to auto populate an Excel sheet based off of which check boxes are marked".

What are you trying to populate? Word or Excel?

As for "I'd like to use numbers 1 - 3,500 but I don't think that's possible", why does it matter whether they're bookmarked?
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
  #3  
Old 08-20-2014, 01:47 PM
zacam87 zacam87 is offline Check Box Form Field Book Mark Auto Fill? Windows 7 64bit Check Box Form Field Book Mark Auto Fill? Office 2010 32bit
Novice
Check Box Form Field Book Mark Auto Fill?
 
Join Date: Aug 2014
Posts: 3
zacam87 is on a distinguished road
Default

I'm sorry if you didn't understand my post.

Basically I'm trying to auto populate the bookmarks for 3500 checkbox formfields in a Word document.

Currently none of the checkbox field settings have bookmarks defined, I need each of the 3500 checkboxes to have a unique bookmark defined - preferably automatically... something like check1, check2, check3... check3500


Hope this helps

Thanks!
Reply With Quote
  #4  
Old 08-20-2014, 02:03 PM
macropod's Avatar
macropod macropod is offline Check Box Form Field Book Mark Auto Fill? Windows 7 64bit Check Box Form Field Book Mark Auto Fill? Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 21,962
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

It is a bit hard to understand what you want when you say things like "a macro in Excel to auto populate an Excel sheet"...

You still haven't explained what bookmarking the checkboxes is supposed to achieve. If they're in the same order as the data in the Excel workbook, there doesn't seem to be any need for that. Indeed, relying them is likely to increase your maintenance overheads.
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
  #5  
Old 08-20-2014, 02:23 PM
zacam87 zacam87 is offline Check Box Form Field Book Mark Auto Fill? Windows 7 64bit Check Box Form Field Book Mark Auto Fill? Office 2010 32bit
Novice
Check Box Form Field Book Mark Auto Fill?
 
Join Date: Aug 2014
Posts: 3
zacam87 is on a distinguished road
Default

The Excel workbook essentially has a single cell associated with each checkbox in the Word document. The word document has a group of 12 check boxes per item. The first checkbox in the word document associates with cell B4, second checkbox with cell C4, third checkbox with cell D4 etc. to M4. Then it transitions to B5, C5, D5... M5 etc.

The Excel macro I've been testing to pull the data out of the Word document is:

Code:
Sub wrd12()
Dim wrd As Word.Application
Set wrd = CreateObject("Word.Application")
With wrd
.Documents.Open "C:\path\to\word.docx"
.Visible = True

End With
Range("b4").Value = wrd.ActiveDocument.FormFields("check1").Result
Range("c4").Value = wrd.ActiveDocument.FormFields("check2").Result
Range("d4").Value = wrd.ActiveDocument.FormFields("check3").Result
Range("e4").Value = wrd.ActiveDocument.FormFields("check4").Result
Range("f4").Value = wrd.ActiveDocument.FormFields("check5").Result
Range("g4").Value = wrd.ActiveDocument.FormFields("check6").Result
All the way to cell M350~ / the end of the document. The format in the Excel sheet isn't necessarily a straight row or column which is why I was looking to bookmark each check box accordingly, however manually entering bookmarks for some 3000~ check boxes leaves a lot of room for error and is time consuming - so I'd like to automate the bookmarking of the check boxes. If there's a better way I should be looking at this please let me know.

Thanks
Reply With Quote
  #6  
Old 08-20-2014, 02:56 PM
macropod's Avatar
macropod macropod is offline Check Box Form Field Book Mark Auto Fill? Windows 7 64bit Check Box Form Field Book Mark Auto Fill? Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 21,962
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

If the checkboxes are the only formfields in the document, you could use:
Range("b4").Value = wrd.ActiveDocument.FormFields(1).Result
Range("c4").Value = wrd.ActiveDocument.FormFields(2).Result
Range("d4").Value = wrd.ActiveDocument.FormFields(3).Result
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
Reply

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
Check Box Form Field Book Mark Auto Fill? Form auto fill based on a different field value. stct Word 26 06-15-2019 04:08 PM
Question about auto-fill form Dsp581 Word 3 04-04-2013 11:27 PM
Check Box Form Field Book Mark Auto Fill? Nested if field that contains a fill-in field is not prompting for fill-in info Nccadm Mail Merge 2 04-02-2013 03:15 AM
Form file timesheet, auto fill date from calander jkeeney Word 1 03-21-2012 12:21 AM
Check Box Form Field Book Mark Auto Fill? How can I fill in form I received in email that used underlines instead of text field Gail L. Word 2 05-17-2009 12:38 PM

Other Forums: Access Forums

All times are GMT -7. The time now is 02:11 AM.


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