Modules & VBA :: Insert Rich Text (HTML Format) From Access To Word 2013

Jul 24, 2014

I'm about to connect my DB to word. So I made a form where the user has to choose what entry to export. The data is inserted in a word file in different bookmarks. But there is one special task to insert the rich text so in this case the html formatted text is displayed like this:

Code:
<html><div>asdf</div></html>

My Text is inserted like this:

Code:
wdApp.ActiveDocument.Bookmarks("-Bookmarkname-").Range.Text = Lrs("-ColumnName-")

Lrs is a Recordset.

So how is it possible to display the html code right in the Word doc?

View Replies


ADVERTISEMENT

Modules & VBA :: Moving Rich Text From Access Memo Field To A Word Text Box

Jul 24, 2015

We need to move rich text from an Access memo field to a Word text box. So far the best Ive been able to come up with is in the code below. In this code pprs!What is a record set field of a table memo field that is bound to a text box enabled for rich text. The rich text seems to be stored as html as so I can get word to convert it by enclosing it in html tags.

Dim What As Word.Shape
Set What = doc.Shapes.AddTextbox(msoTextOrientationHorizontal , doc.PageSetup.LeftMargin, 225, 534, 0)
Dim sPath As String
sPath = "G:Temp.html"
Open sPath For Output As 1
Print #1, "<HTML>" & pprs!What & " </HTML>"
Close #1
What.TextFrame.TextRange.InsertFile (sPath)

View 2 Replies View Related

Modules & VBA :: HTML In Rich Text Field

Oct 21, 2014

I'm trying to output some logging to a form with a Rich text textbox

This is what the form is displaying:
14:16:32: check OK: 500<10000andS235='s460'>
14:16:32: check OK: 500<10000andS235='s355'>
14:16:32: check failed:too short 500<1000231231 >
14:16:32: Ready ...

There is some coloring in the text but I'm not display that here (copy/paste of the textbox)

This is the HTML behind it (? txtbox in imm.window):
14:16:32: <font color=black>check OK: 500<10000andS235='s460'</font><br />14:16:32: <font color=black>check OK: 500<10000andS235='s355'</font><br />14:16:32: <font color=red><strong>check failed:too short 500<1000231231 </strong></font><br />14:16:32: <font color=green><strong>Ready ... </strong></font><br />

The problem is in the red > that are added to each line. I have no clue where they are coming from, in fact: they are NOT in the HTML.When I display this piece of HTML in IE I don't get the red > behind each line.I have tried to use <p> of <div> instead of <br/> but that makes no difference

Code:
Forms!frm_Calculationlog.txtmsg = Forms!frm_Calculationlog.txtmsg & "<div>" & _
Format(Now(), "hh:nn:ss") & ": " & _
IIf(strColor <> "", "<font color=" & strColor & ">", "") & IIf(booBold, "<strong>", "") & strMessage & _
IIf(booBold, "</strong>", "") & IIf(strColor <> "", "</font></div>", "")

I can assure you that the > is NOT in the strMessage ... f.e. this is the ouput of strMessage on the first line: 500 <10000 and 'S235' ='s460'

strColor is a string in which I can set a color ("red", "blue")
booBold is a boolean with which I can set text to bold

View 4 Replies View Related

Rich Text Area To Word Doument.

Oct 16, 2006

Hi..

I am using RTF2 ActiveX Control which enables me to include the Rict Text Controls in my Access Form.

I want to generate a doc document out of the information which i type in the RTF2 Area on the Access Form. And whatever Rich Text Format information i have written there (for eg in Bold, Italics, Indentation, Tables created, Bullets n Numbering etc), is retained as it is on the Doc document which i am generating with the help of bookmarks.

Please help in how do i do that 'coz i am not able to do it using the Rich Text Format...

Thanking you,

with regards,
Kapil Sharma

View 3 Replies View Related

Modules & VBA :: Import Formatted Rich Text From Lotus Notes To MS Access

Sep 10, 2013

I have a VBA code to import mail from Lotus Notes into Access. The database user is able to read his email inside Access, similar to any email program.

Unfortunately, when I use the GetItemValue (lotusscript) method to read the body of the email message, Notes will render the Rich Text information as Plain Text, and I end up with no formatting information (bold letters, underline, text color, etc.)

How to import messages from Notes to Access and keep the text formatting? I am storing the data in a Rich Text Memo field in a table. I have found code to write HTML (MIME) messages, but not to import them into Access.

View 2 Replies View Related

Exporting Reports In Rich Text Format

Feb 25, 2005

Can anyone help?!
We are trying to export some reports into a Rich Text format using Access on Office 2003 on a Win XP op system. When doing this on Win 98 the Rich text document was slightly out of line but not too bad. Now we are doing it on XP it is completely out of line and unusable. Does anyone have any suggestions please?
Regards
Richard

View 3 Replies View Related

Modules & VBA :: How To Insert Data From Access To Word Template

Jul 28, 2013

I'm doing a project for my work. I created a few reports in Access. Some of these reports are simple graphic bars. How can I insert these reports into a word document template?

View 2 Replies View Related

Modules & VBA :: Insert Word File Into Outlook Email Within Access

Jul 8, 2013

I like to do following task using access VBA:

1. Open outlook.
2. Select word file(with tables and graphics) and insert into new outlook email.

View 1 Replies View Related

Modules & VBA :: How To Save Word Template As HTML

Apr 29, 2014

I'm using the below to merge an access form into a word template (it's a starter for 10).

That works fine. What I need to do is save the word template as HTML so I can then upload it to my website.

Dim wordApp1 As Word.Application
Dim docPath1 As String
Dim fileName1 As String
Dim PageName As String
PageName = Forms!Frm_Page_Create![Page]
docPath1 = Application.CurrentProject.Path & "Merges"

[code]....

View 1 Replies View Related

Modules & VBA :: HTML Format Email With Hyperlink

Aug 20, 2014

I am using the following vba code to create and send an html format email message. The key information in the email is a hyperlink to a network drive folder location using [Directory] as a hyperlink table value to get the address that is stored like this:
K:PipelinesP9 - TEP ProductsMOP AID-1500Final Approved

The email hyperlink that is produced looks like this:

#K:PipelinesP9_-_TEP_ProductsMOP_AID-
Dim appOutLook As Outlook.Application
Dim MailOutLook As Outlook.MailItem
Dim MOPVDB As String
MOPVDB = "H:PGADSBYMOP VALIDATIONTRACKINGMOPVDBMOP Validation DatabaseFE.accdb"
Set appOutLook = CreateObject("Outlook.Application")

[code]...

View 1 Replies View Related

Modules & VBA :: Insert HTML File Into Body (inside Loop Email)

Apr 30, 2015

What I want to do is inset a html file into the body of the email . I have created a publisher file and saved as html ..say

C: estpub1.html

How do I get this in to the body ?

Code to date below (not the tidiest - but it works)

Private Sub Command0_Click()
Dim MyDb As DAO.Database
Dim rsEmail As DAO.Recordset
Dim OutApp As Object
Dim OutMail As Object
Dim strAttach1 As String

[Code] ......

View 9 Replies View Related

Modules & VBA :: Lotus Notes Email In Html Format

Jul 2, 2014

I'm trying to create a lotus notes email through vba that contains data from one of my access tables. Since I'd like the data to be displayed in a tabular fashion, I'm trying to format the body of the email in html.

View 1 Replies View Related

Forms :: MA Access 2013 Before Insert Raise Validation Error

Oct 11, 2014

I use before insert code procedure to insert default value for one, or more fields in row. It is normal to have these fields are disabled. This event occurs when you try to enter a value in any another field in a row. However , when I finish entering the field going to the event before update regardless and trigger a validation of all fields in a row. I am not leaving from row , I want to go further input in other fields.How to insert default (calculated) values in new row.

View 2 Replies View Related

Ms Access Read Only Html Format - How Do I Make One

May 14, 2007

Hi im kinda a newbie here so, any helpful comments or links of creating a ms access database where it can be viewed in html is welcome. thanks

View 1 Replies View Related

Transfer HTML That Has XLS File Format In Access 2010 Using VBA

Oct 20, 2015

I have a downtime system that was created by our IT department that records the downtime of the line stops, it has export to excel button that will export the downtime to excel based off the parameters of date and time. I want to do the export then import to access for downtime analysis. The problem I am having is the programmers export it as HTML with .xls file format. and the worksheet has a date associated with it as well as the spreadsheet has a tab that contains a date and I can't figure away to import to a fixed table. So I tried the transfer spreadsheet not knowing it was in HTML, couldn't recognize the format, then I tried transfer HTML, can't find the file because of .xls file format. I know I could re-save it as a excel file but was trying to keep the steps to a min. Is there a way to import even though it has a date attached to the file and spreadsheet tab.

View 7 Replies View Related

Rich Text Plugin For MS Access

Oct 4, 2006

Hi,

I have created forms in MS Access.. Now i want to attach Rich Text Format with each of the Text Box or Text Area... How can i do that...
I was trying to search for a plugin which would get attached with MS Access and then while creating the forms it would get attached with the Text Box and Text Areas..

Kindly please help me in getting a solution to this problem..

Thanking you,

with regards,
Kapil Sharma

View 7 Replies View Related

Modules & VBA :: Change Color Of Substring In Rich Text Field

Aug 14, 2013

I'm using Access 2010. I'm passing a string into the OpenArgs of my report - works fine. In the report there are 3 rich text fields which may contain the text I passed in, and if so I want to change the color of that text to red so it stands out.

The value passed to the report changes so I'll need to use VBA in the detail's format section to check each of the 3 rich text fields.

View 5 Replies View Related

Modules & VBA :: Inserting Rich Text Into Lotus Notes Email

Jul 23, 2015

I have been sending plain text emails for a while, but now I have a project where the formatting of the text needs to be specific and I need to send as rich text.

I can use the rich text from a table, excel, or word, but I am at a loss on how to get the data to Lotus Notes.

View 1 Replies View Related

Modules & VBA :: Export To Excel (rich Text) Column Not Formatting Correctly

Feb 6, 2015

I have a process that is getting data from sharepoint page, containing 2 list. Both list contain one field I am having issues in my export, a 'Multiple Lines of Text' type field which is Rich Text in sharepoint. I have an access DB with a linked table to those 2 list. Access show the one field I am having problems with as Memo.

The Linked table pulls/display the rich text data field correctly. My access query pulls/displays the data correctly.

My export procedure does not, the cell it exports to includes the HTML Tags. How can i modify my VBA export procedure to export to excel in plain text, i dont need the same format, just want to drop the html tags.

Code:
Public Sub StatusReportExport()
On Error Resume Next
' Test to see if the file currently exist, if so, delete file, so new file can be written.
Kill ("L:Connect SiteStatus Report " & Year(Date) & "-" & Month(Date) & "-" & Day(Date) & ".xls")
If Dir("L:Connect SiteStatus Report " & Year(Date) & "-" & Month(Date) & "-" & Day(Date) & ".xls") <> "" Then
MsgBox "Status Report.xls File already in use!" & vbNewLine & "Please Close File, then rerun Report."

[code]....

View 6 Replies View Related

General :: Rich Text In Outlook Email From Access Form

Sep 4, 2013

I am close to getting code to send an email from access with the body of the email populated with a Rich Text textbox from my access form. The problem I am having is that the body of the email is converted to plain text in Outlook which is creating problems for me. How to identify what I can do to convert to rich text or HTML in Outlook? I also want to attach a table that is populated by a query in my application, but i haven't got that far yet.

View 5 Replies View Related

Modules & VBA :: Find Text On Loaded HTML Page

May 5, 2015

I am simply trying to find text on a Web Browser Control htm page.

Using MS Access 2003, I have a form that includes the activeX Web Browser Control. On load of the form I initialize the web like below:

Code:
Dim strURL As String
strURL = "http://www.justice.gov/eoir/profcond/chart.htm"
Me.WebBrowser0.Navigate strURL
Me.WebBrowser0.Silent = True

The page loads fine.

Now, also, on my form is an unbound text box I call: [txtFind] and a command button I call [cmdFind]. I want [cmdFind] to find the first occurrence of the value in [txtFind]. My code below doesn't do anything when I click the [cmdFind] button.

Code:
Public oRange As Object
Public myfindFirst As Boolean
Public intTextLength As Long
Private Sub cmdFind_Click()
Dim sSearch As String
Dim strText As String

[Code] .....

View 9 Replies View Related

Modules & VBA :: Remove HTML Text From Make Table

Mar 15, 2014

I need to remove html text from a make table in access 2007. My table name is "Bad Actors Comments Column" and the column where the html text resides is "FirstOfADD_TEXT. VBA code to remove the html text?

View 3 Replies View Related

Modules & VBA :: Change HTML Text On Email If Checkbox Selected

Feb 18, 2014

I have the following code which works perfectly BUT I want to be able to add another line of text if users enable a checkbox. I have tried everything I can think of but can't get it to work. When using an "IF check150" statement it just adds the extra text in regardless of selection or not.

Code:

Function Mail_Radio_Outlook6(activedoc As String)
Dim OutApp As Object
Dim OutMail As Object
Dim strbody As String
Dim acc_req As String
Set OutApp = CreateObject("Outlook.Application")

[Code] ....

This is fine most of the time but If a user ticks check150 I want to add another paragraph.

Do I use an IF statement, if so in what format? is it a separate function etc?

I am slowly getting more familiar with Access but still come unstuck on the simplest of things at times.

View 3 Replies View Related

Access 2013 Web App - Copy All Text To One Textbox?

Feb 11, 2014

I need to copy all text from all textbox to one text box.

View 14 Replies View Related

General :: Possible To Insert A Button In Access Form Which Would Open A Word Document

Mar 3, 2013

I have an access form that fills an access table (MS Access 2003). Also, I have a Word (2010) document/template with some template text and empty fields which should be filled with data from access. Is it possible to insert a button in access form which would open a word document and populate appropriate fields with data from that form?

View 4 Replies View Related

Access 2013 Report Data Showing Up As Number Rather Than Text

Aug 13, 2015

I have a people table; Ethnicity Table; Program Type Table; Attendance Table.

I enter the people into the people table then enter people into the attendance table with lookup for name from the people table and a lookup for program type from program type table and enter date attended. I then run a query on the attendance table to remove duplicates. I created a form from the attendance query there are 3 headers Program, Ethnicity, Name. but the program type comes up as the ID number and not the text name.

The Ethnicity did the same thing but when I added the Ethnicity from the people table to the ethnicity header it show up as the name and I hide the box with the number but when I add the program type from the program type table to the program header is changes the source of the report to the program type table and then nothing shows up. It did not do that when I added the ethnicity type from the ethnicity table to the ethnicity header.

View 1 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved