#1
|
|||
|
|||
Save Form Data as Delimited text via VBA
Hi
I'm trying to write some code to take some Word Forms and export them as text delimited text files. Manually I can do this, but I'd like to automate it through vba. I can get the code to work to convert from .doc to .txt, but there is a couple of additional things I cant see how to do. In the advanced options of word 2007 under Preserve Fidelity there is a tick box that I need to turn on for "Save form data as delimited text file". I'm struggling to find how to turn this on through vba. Also, when the file is saved the csv file save dialog box has an option via a tick box called "Allow character substitution" at the point you choose the CSV format. I'm struggling to find this as well. Any pointers towards documentation on these features would really be helpful if anyone can help? Cheers Mike |
#2
|
||||
|
||||
Is there a reason for not using the same Save method to save the form data instead of just saving the document as a text file?
Code:
With ActiveDocument .SaveAs2 FileName:=Split(.FullName, ".")(0) & "_Form.csv", _ Fileformat:=wdFormatText, SaveFormsData:=True End With
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
#3
|
||||
|
||||
You might find http://www.gmayor.com/ExtractDataFromForms.htm useful.
__________________
Graham Mayor - MS MVP (Word) (2002-2019) Visit my web site for more programming tips and ready made processes www.gmayor.com |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Outlook 2013 Forms (how to questions)- Quick opening of a form file & Linking form's data to Excel | gamin2407 | Outlook | 0 | 01-21-2017 10:14 PM |
Data Entry Form - Hide Click here to enter text. | sunrise06 | Word | 4 | 05-07-2015 08:44 PM |
designing a custom outlook form - this form is for only sending mails nt collect data | balamuralibm | Outlook | 0 | 05-21-2014 08:08 AM |
Save as delimited text | dwillyfan | Word | 4 | 08-29-2012 09:58 AM |
Is there a way to do this? (automatically enter text based on form data) | TIKKI555 | Word | 0 | 05-26-2010 09:21 AM |