Microsoft Access HTML Viewer

Discussion in 'Access Forms Coding' started by JamieJamie, Jul 26, 2010.

  1. JamieJamie

    JamieJamie Guest

    I have a field of text written in html and stored in a memo field.
    instead of displaying in a memo field, i would like to see it
    presented as html (as you would in interent explorer)

    is there any easy way of doing this?

    thanks in advance for your help
     
    JamieJamie, Jul 26, 2010
    #1
    1. Advertisements

  2. JamieJamie <> wrote in
    news:
    :

    > I have a field of text written in html and stored in a memo field.
    > instead of displaying in a memo field, i would like to see it
    > presented as html (as you would in interent explorer)
    >
    > is there any easy way of doing this?


    Depends on your version of Access. In A2010, the new rich-text
    control makes this quite transparent. Before that you had to use the
    non-native web browser control, which works fairly well but has some
    quirks (and can only display a file from the file system, not an
    arbitrary stream of HTML).

    --
    David W. Fenton http://www.dfenton.com/
    contact via website only http://www.dfenton.com/DFA/
     
    David W. Fenton, Jul 26, 2010
    #2
    1. Advertisements

  3. JamieJamie

    Ron Weiner Guest

    David W. Fenton formulated the question :
    > JamieJamie <> wrote in
    > news:
    >>

    >
    >> I have a field of text written in html and stored in a memo field.
    >> instead of displaying in a memo field, i would like to see it
    >> presented as html (as you would in interent explorer)
    >>
    >> is there any easy way of doing this?

    >
    > Depends on your version of Access. In A2010, the new rich-text
    > control makes this quite transparent. Before that you had to use the
    > non-native web browser control, which works fairly well but has some
    > quirks (and can only display a file from the file system, not an
    > arbitrary stream of HTML).


    While it is true that you can not bind a Web Browser control to an
    Access data source as you can with a Rich Text control. You do not
    HAVE to point the web Browser control to either a file on the disk or a
    URL on the internet.

    The Web Browser control CAN accept a stream of html in the
    BeforeNavigate2 Event.

    wb.Document.Open "text/html", "replace"
    wb.Document.Write strHTML
    wb.Document.Close

    Been using this code for years in an old VB6 app that builds the string
    strHTML above from data pulled out of an Access database.

    Rdub
     
    Ron Weiner, Jul 27, 2010
    #3
  4. Ron Weiner <> wrote in
    news:i2lavo$lr8$-september.org:

    > While it is true that you can not bind a Web Browser control to an
    > Access data source as you can with a Rich Text control. You do
    > not HAVE to point the web Browser control to either a file on the
    > disk or a URL on the internet.
    >
    > The Web Browser control CAN accept a stream of html in the
    > BeforeNavigate2 Event.
    >
    > wb.Document.Open "text/html", "replace"
    > wb.Document.Write strHTML
    > wb.Document.Close
    >
    > Been using this code for years in an old VB6 app that builds the
    > string strHTML above from data pulled out of an Access database.


    Damn. I didn't know that. I'll have to try it in the app of mine
    that makes the most use of the web browser control (and writes to a
    temp file).

    You learn something new every day, and in this case, it's for
    something I've been doing for better than half a decade!

    --
    David W. Fenton http://www.dfenton.com/
    contact via website only http://www.dfenton.com/DFA/
     
    David W. Fenton, Jul 28, 2010
    #4
  5. "Ron Weiner" <> wrote in message
    news:i2lavo$lr8$-september.org...
    > David W. Fenton formulated the question :
    >> JamieJamie <> wrote in
    >> news:
    >>>

    >>
    >>> I have a field of text written in html and stored in a memo field.
    >>> instead of displaying in a memo field, i would like to see it
    >>> presented as html (as you would in interent explorer)
    >>>
    >>> is there any easy way of doing this?

    >>
    >> Depends on your version of Access. In A2010, the new rich-text
    >> control makes this quite transparent. Before that you had to use the
    >> non-native web browser control, which works fairly well but has some
    >> quirks (and can only display a file from the file system, not an
    >> arbitrary stream of HTML).

    >
    > While it is true that you can not bind a Web Browser control to an Access
    > data source as you can with a Rich Text control. You do not HAVE to point
    > the web Browser control to either a file on the disk or a URL on the
    > internet.
    >
    > The Web Browser control CAN accept a stream of html in the BeforeNavigate2
    > Event.
    >
    > wb.Document.Open "text/html", "replace"
    > wb.Document.Write strHTML
    > wb.Document.Close
    >
    > Been using this code for years in an old VB6 app that builds the string
    > strHTML above from data pulled out of an Access database.
    >
    > Rdub


    I'd like to add my thanks to David's, and for much the same reason.
     
    Stuart McCall, Jul 28, 2010
    #5
  6. "Stuart McCall" <> wrote in
    news:icL3o.288384$tH4.170868@hurricane:

    > "Ron Weiner" <> wrote in message
    > news:i2lavo$lr8$-september.org...
    >> David W. Fenton formulated the question :
    >>> JamieJamie <> wrote in
    >>> news:
    >>> .com
    >>>>
    >>>
    >>>> I have a field of text written in html and stored in a memo
    >>>> field. instead of displaying in a memo field, i would like to
    >>>> see it presented as html (as you would in interent explorer)
    >>>>
    >>>> is there any easy way of doing this?
    >>>
    >>> Depends on your version of Access. In A2010, the new rich-text
    >>> control makes this quite transparent. Before that you had to use
    >>> the non-native web browser control, which works fairly well but
    >>> has some quirks (and can only display a file from the file
    >>> system, not an arbitrary stream of HTML).

    >>
    >> While it is true that you can not bind a Web Browser control to
    >> an Access data source as you can with a Rich Text control. You
    >> do not HAVE to point the web Browser control to either a file on
    >> the disk or a URL on the internet.
    >>
    >> The Web Browser control CAN accept a stream of html in the
    >> BeforeNavigate2 Event.
    >>
    >> wb.Document.Open "text/html", "replace"
    >> wb.Document.Write strHTML
    >> wb.Document.Close
    >>
    >> Been using this code for years in an old VB6 app that builds the
    >> string strHTML above from data pulled out of an Access database.

    >
    > I'd like to add my thanks to David's, and for much the same
    > reason.


    And silly me, I didn't even say thanks!

    So, here it is:

    Thanks very much, Ron, for pointing this out!

    --
    David W. Fenton http://www.dfenton.com/
    contact via website only http://www.dfenton.com/DFA/
     
    David W. Fenton, Jul 28, 2010
    #6
  7. JamieJamie

    Ron Weiner Guest

    David W. Fenton formulated on Wednesday :
    > "Stuart McCall" <> wrote in
    > news:icL3o.288384$tH4.170868@hurricane:
    >
    >> "Ron Weiner" <> wrote in message
    >> news:i2lavo$lr8$-september.org...
    >>> David W. Fenton formulated the question :
    >>>> JamieJamie <> wrote in
    >>>> news:
    >>>> .com
    >>>>>
    >>>>
    >>>>> I have a field of text written in html and stored in a memo
    >>>>> field. instead of displaying in a memo field, i would like to
    >>>>> see it presented as html (as you would in interent explorer)
    >>>>>
    >>>>> is there any easy way of doing this?
    >>>>
    >>>> Depends on your version of Access. In A2010, the new rich-text
    >>>> control makes this quite transparent. Before that you had to use
    >>>> the non-native web browser control, which works fairly well but
    >>>> has some quirks (and can only display a file from the file
    >>>> system, not an arbitrary stream of HTML).
    >>>
    >>> While it is true that you can not bind a Web Browser control to
    >>> an Access data source as you can with a Rich Text control. You
    >>> do not HAVE to point the web Browser control to either a file on
    >>> the disk or a URL on the internet.
    >>>
    >>> The Web Browser control CAN accept a stream of html in the
    >>> BeforeNavigate2 Event.
    >>>
    >>> wb.Document.Open "text/html", "replace"
    >>> wb.Document.Write strHTML
    >>> wb.Document.Close
    >>>
    >>> Been using this code for years in an old VB6 app that builds the
    >>> string strHTML above from data pulled out of an Access database.

    >>
    >> I'd like to add my thanks to David's, and for much the same
    >> reason.

    >
    > And silly me, I didn't even say thanks!
    >
    > So, here it is:
    >
    > Thanks very much, Ron, for pointing this out!


    Guys

    Thanks is absolutely not necessary. I thought that this is what the
    newsgroup was about. Hardly a week goes by that I am not learning and
    pilfering code from another's post. Also you gotta' know I did not
    invent this, I can't remember any of the details, but you can be sure,
    I stole if from somewhere!

    Rdub
     
    Ron Weiner, Jul 29, 2010
    #7
  8. JamieJamie

    Guest

    Can you share more code? I'm getting Document = Nothing in object passed to event, so Document.Open is not working.
    Thanx

    четверг, 29 Ð¸ÑŽÐ»Ñ 2010 г., 4:15:19 UTC+4 пользователь Ron Weiner напиÑал:
    > David W. Fenton formulated on Wednesday :
    > > "Stuart McCall" <> wrote in
    > > news:icL3o.288384$tH4.170868@hurricane:
    > >
    > >> "Ron Weiner" <> wrote in message
    > >> news:i2lavo$lr8$-september.org...
    > >>> David W. Fenton formulated the question :
    > >>>> JamieJamie <> wrote in
    > >>>> news:
    > >>>> .com
    > >>>>>
    > >>>>
    > >>>>> I have a field of text written in html and stored in a memo
    > >>>>> field. instead of displaying in a memo field, i would like to
    > >>>>> see it presented as html (as you would in interent explorer)
    > >>>>>
    > >>>>> is there any easy way of doing this?
    > >>>>
    > >>>> Depends on your version of Access. In A2010, the new rich-text
    > >>>> control makes this quite transparent. Before that you had to use
    > >>>> the non-native web browser control, which works fairly well but
    > >>>> has some quirks (and can only display a file from the file
    > >>>> system, not an arbitrary stream of HTML).
    > >>>
    > >>> While it is true that you can not bind a Web Browser control to
    > >>> an Access data source as you can with a Rich Text control. You
    > >>> do not HAVE to point the web Browser control to either a file on
    > >>> the disk or a URL on the internet.
    > >>>
    > >>> The Web Browser control CAN accept a stream of html in the
    > >>> BeforeNavigate2 Event.
    > >>>
    > >>> wb.Document.Open "text/html", "replace"
    > >>> wb.Document.Write strHTML
    > >>> wb.Document.Close
    > >>>
    > >>> Been using this code for years in an old VB6 app that builds the
    > >>> string strHTML above from data pulled out of an Access database.
    > >>
    > >> I'd like to add my thanks to David's, and for much the same
    > >> reason.

    > >
    > > And silly me, I didn't even say thanks!
    > >
    > > So, here it is:
    > >
    > > Thanks very much, Ron, for pointing this out!

    >
    > Guys
    >
    > Thanks is absolutely not necessary. I thought that this is what the
    > newsgroup was about. Hardly a week goes by that I am not learning and
    > pilfering code from another's post. Also you gotta' know I did not
    > invent this, I can't remember any of the details, but you can be sure,
    > I stole if from somewhere!
    >
    > Rdub
     
    , Jan 30, 2013
    #8
  9. JamieJamie

    Guest


    > The Web Browser control CAN accept a stream of html in the
    > BeforeNavigate2 Event.
    >
    > wb.Document.Open "text/html", "replace"
    > wb.Document.Write strHTML
    > wb.Document.Close
    >
    > Been using this code for years in an old VB6 app that builds the string
    > strHTML above from data pulled out of an Access database.
    >
    > Rdub


    Perfect Rdub!
     
    , Jan 14, 2014
    #9
    1. Advertisements

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Chris

    Where did Snapshot Viewer download go?

    Chris, Jul 21, 2003, in forum: Access Forms Coding
    Replies:
    3
    Views:
    90
    Carl Rapson
    Jul 21, 2003
  2. Randy K.

    scripting picture and fax viewer

    Randy K., Jan 21, 2004, in forum: Access Forms Coding
    Replies:
    1
    Views:
    72
    David Candy
    Jan 21, 2004
  3. Cabby

    Default viewer of JPEG Hyperlinks

    Cabby, Feb 16, 2004, in forum: Access Forms Coding
    Replies:
    1
    Views:
    74
    Graham Mandeno
    Feb 16, 2004
  4. Kumar

    pdf viewer

    Kumar, Feb 19, 2004, in forum: Access Forms Coding
    Replies:
    0
    Views:
    62
    Kumar
    Feb 19, 2004
  5. L M Kahn
    Replies:
    4
    Views:
    261
    L M Kahn
    Oct 20, 2005
  6. thersitz

    html property vs html field data type

    thersitz, Sep 14, 2006, in forum: Access Forms Coding
    Replies:
    1
    Views:
    69
    thersitz
    Sep 14, 2006
  7. Gary B
    Replies:
    8
    Views:
    117
    Gary B
    Mar 15, 2007
  8. SEAN DI''''ANNO

    Internet Page Viewer In Access 2000 Form (I Think)

    SEAN DI''''ANNO, Feb 5, 2008, in forum: Access Forms Coding
    Replies:
    3
    Views:
    64
    Daniel Pineault
    Feb 5, 2008
Loading...