Hello friends, I have a good question for you.
I have a form in Access with a check box named chk1.
On the same form I have a code that export my data to a template in MS Word. I use bookmark to export my access data. No problem with regular data but cannot handle checkboxes. Basically I need help to export the check box value (yes or no) into a check box places in my word template. In this template I have a checkbox. If I doulble click in to it I get a window which allows me to bookmark the checkbox but when I export the access data, I will get a YES or NO priot to the checkbox in word. Is there any way I can solve this problem?
This is a sample of my code:
objWord.ActiveDocument.Bookmarks("chek1").Select
If Err.Number = 0 Then
objWord.Selection.Text = Me.chek1
Else
Err.Number = 0
End If
I'm creating a word document from Access, using bookmarks, and save the document when it's first created. However, the user may then update the word document with additional information a the Access record with additional information. How can I get the bookmarks to refresh in the word document when the user clicks on the link to open the word document without erasing any additional information they've typed into the word document by hand?
I have searched the forums for similar problem but I was unable to find it.
I have some buttons that export the data from a form into a Word Document. It generally works but there are some issues.
I have Access 2003 but the people using it only use the runtime version of Access and the environment is Office 2000.
I have copied code from other examples and maybe missing something that is causing the issues.
1. When I export the record it is causing problems with the Normal.dot template. When I try to close Word it keeps asking me that I have modified that template. After pressing Cancel button twice it the save box disappears. 2. When I leave the code Dim objWord As word.Application I get an error message about a compile error User defined Type not defined. 2. When the users try to export a record to the specific word template I created and a required field is empty an error message is displayed and then closes the application.
Any help will be appreciated. I am a newbie when it comes to code.
Sample code is below. Private Sub Command1079_Click() Dim objWord As word.Application 'Start Microsoft Word 2000. Set objWord = CreateObject("Word.Application")
With objWord 'Make the application visible. .Visible = False
'path and name of the template your are using. ' objWord.Documents.Add ("U:Asset Strategy and Commercial PropertyCommercial PropertyTaskmasterletterofobjection.dot") .Documents.Open ("C:Documents and SettingsDadMy DocumentsWorkTaskmasterletterofobjection.dot")
'This is for the bookmark that you created in the template
Print_Reconsideration_Err: 'If a field on the form is empty, remove the bookmark text, and 'continue. If Err.Number = 94 Then .Selection.Text = "" Resume Next
End If objWord.Application.Options.PrintBackground = False objWord.Application.ActiveDocument.PrintOut
I have a template fax set up in Microsoft word and want to be able to export fields from my database (in form view) to the word document. For example, I have a 'purchase order No' on the access form which I want to send to the Word document. When exported I then want the user to be prompted to save the document as a new name so they do not overwrite the original template fax.
I have a table called "MPI_CODE" it has 4 columns. How can I export this to Word? By creating a new document first (Using Save dialog) then exporting that table to the word doc. Mainly looking for the code to export the table into word.
Friend, I am using a code to export data from a table to a word document using bookmarks and have a problem with the SSN format. When I export the ssn it shows in my word field in this way: 123456789. What I need it that it shows using the following format: 123-45-6789
This is the code:
objWord.ActiveDocument.Bookmarks("SSN").Select If Err.Number = 0 Then objWord.Selection.Text = Me.SSN Else Err.Number = 0 End If
we run a family business and i do all the quotations.
i have an access database in which i record these quotations and whether or not we got the job or not, and i have to input all the data manually.
i wondered if i could set a word document so that it would automatically export certain areas of the quotation (like the date, who it was to, what work we are quoting for, how much it would cost, etc) into the correct fields in my database.
i have a form which displays 2 charts, i am able to export them to word document but i donot know how to paste them one after the other. currently they get printed one over the other.
here is the code :
Code:
Private Sub cmd_Print_Click() Dim MyChartObj As Object Dim MyLineObj As Object Set MyChartObj = [Forms]![MainForm]![Sub_DisplayFm]![Graph_Chart] Set MyLineObj = [Forms]![MainForm]![Sub_DisplayFm]![Graph_Line] MyChartObj.SetFocus DoCmd.RunCommand acCmdCopy
I have a database witch includes a continuous form (named frmExport). It could be very useful for me if i can find a way so to export data from access 2007 and then to import them into a word file.
Please note: The access data will be inserted into word table.
I had to delete a database so I exported selected records using export as a text file thinking I would get some sort of delimited text file that I could later use. Instead I got some sort of fixed length file with .............. between records and | between fields.
I'd like to convert this data to a tab delimited file.
Is there a way to export a query of 14 items to a word report. I have a table of 14 items in that I use as a query but it only exports 1 item to the report.
I am trying to export an attachment item (Picture .jpg) to a word document. I have been exporting text to a word document successfully with below syntax "
With rst strLandSalesID = Nz(.Fields("LandSalesID")) strPhotograph = Nz(.Fields("Attachments"))
I would like to have a button (cmdPrintIntroLetter) on my Client Details form that takes the client name, address and company data of the record that I'm currently viewing and putting it into an address box in a Word document.
e.g. when I contact a new customer and input their details into my form I want to then be able to send them an introductory letter (standard wording) from me with just the click of a button.
FAO: FirstName LastName CompanyName Address1 Address2 Address3 Town County Postcode
I've been faffing around with concatenating my address fields into an address textbox in a report but I really don't like using a report to write a letter, it just feels wrong - on every level.I also want another button (cmdEmailBrochure) which opens an email template using the records email address and inserting the name of the client into the body of the email.
I am working in Access 2013.I'll be performing a series of inspections at a number of intersections for a small community. The data being captured is consistent from site to site and lends itself to a database application, and what I would like to do is the following:Use forms to capture the data.Generate a report to preview the output for a single record. I may ultimately decide to set the report datasource to a query.Attach a macro to a button that exports fields from that record to a template based in MS Word.The first two bullet items I can handle with my limited Access capability. Each file has to be individually reviewed and saved, and each file will ultimately contain an electronic signature.
I have been trying to get this to work but without success.
My original source was [URL] ....
The code looks good apart from the fact that the Inspector was not Dimensioned. Anyway, here is my code which fails as the error message is that objSel is not set.
Code: Dim MyOutlook As Outlook.Application Dim MyMail As Outlook.MailItem Set MyOutlook = New Outlook.Application Set MyMail = MyOutlook.CreateItemFromTemplate(DLookup("TemplateFolder", "Company Details") & "eMail Template bm4.oft")
How to match 4 character word or number or combination by identical 4 characters word or number or combination in one word have 10 or 15 characters.
I have to two separate tables (Table A and Table B). Table A has one column (Tag No) and Table B has about 15 columns with one column name Tag No as below
Table A
Table B
Tag No
Tag No
2009
ZZZ-2030-DC
2010
ZZZ-2010-M9P
[code]....
They're both in MS Access.I am trying to match 2 tables - columns (Tag No) with join query, but not success. I want to match 4 characters in Table-A with 4 similar characters in Table-B (Tag No) cell.What query is suitable to compare two tables.
My end goal is to populate a pre-existing table in an MS Word document with records from a query. The easiest way I've found (through scouring the internet) is to start with the code below (ran during OnClick() even in Access) to get the table the same size as the recordset:
Code: Dim wDoc As Word.Document Dim wTable As Word.Table Dim wCell As Word.Cell Set wDoc = appWord.Documents.Add(strDocLoc) wDoc.Visible = True
[Code] ....
The code will shrink the table down just fine if the table has more rows than the recordset +1 (for header column). My hangup with this is the last line ("Selection.InsertRowsBelow 5") isn't executing; rows are not being added to the table. I get no errors -- it just does nothing. I set it as "Selection.InsertRowsBelow 5" arbitrarily just to see if it would even add rows, and sure enough it's not.
Hello, Does anyone knows how can I export the export/import specifications (which file/directory) and how can I import/export the specifications between different versions of Access. Thanks!
I am exporting a table to word and I have come across a problem. My code opens a template, creates a table with the correct number of rows and columns at a certain position, and then adds data to it. At this point, everything is fine. But, here is where the problem sticks its ugly head out. I am modifying the column widths and every other time I run it, it crashes, saying something about not being able to access the remote server. Run time error 462. I have checked in the task manager that word is being quit properly each time and tried going to different templates. The first time I run it, it runs fine. The second time, it crashes on the line where I change the width. Here is the line of code.
mytable.Columns(1).Width = InchesToPoints(1.2)
I have found that if I close the document after it is created and leave word open, it will run fine. I think I am in the same boat as mrpauly. But his post date is 23rd April 2001… http://www.access-programmers.co.uk/forums/showthread.php?t=26363
Has anyone else seen or heard anything like this? I’m really confused… Thanks for any help anyone can give.
Hello, I made a database application and i need some help: in the application i use a script that modifies word documents by opening ms word application, but some customers don't want to install ms word. I'm asking if someone knows tto exist some kind of word runtime that i can modify word documents without having word installed. I'm using also vb6.