crfangmann
New Member
- Joined
- May 28, 2014
- Messages
- 2
Hi all,
I am relatively new to VBA, and very new to HTML, and I am trying to connect the dots between the two. I have looked through many forums, and I can't quite seem to find what I need.
I am trying to populate a web form with Excel VBA. I have been able to populate the rest of the form, but there is one specific field I can't seem to populate, titled "Description (Local Language)". I have posted the relevant part of the code below. Where it reads "test description" in the HTML is where I manually typed into the web form. I want to be able to populate that area using input from vba.
HTML portion of code from website:
Here is the vba code that works on the other fields, and the errors I receive when I try to populate the "Description (Local Language)" field.
I don't know how to access this part of the form from the vba. Any help would be much appreciated. Thank you.
<style type="text/css">
.img { vertical-align: text-bottom; border: none; }img { border: none; }body { font-style: normal; font-variant: normal;
</style><style type="text/css">
.img { vertical-align: text-bottom; border: none; }img { border: none; }body { font-style: normal; font-variant: normal;
</style>
I am relatively new to VBA, and very new to HTML, and I am trying to connect the dots between the two. I have looked through many forums, and I can't quite seem to find what I need.
I am trying to populate a web form with Excel VBA. I have been able to populate the rest of the form, but there is one specific field I can't seem to populate, titled "Description (Local Language)". I have posted the relevant part of the code below. Where it reads "test description" in the HTML is where I manually typed into the web form. I want to be able to populate that area using input from vba.
HTML portion of code from website:
HTML:
<textarea id="rte2_fld_zRep3" name="fld_zRep3" style="margin: 0px; border: 0px; display: none; visibility: hidden; height: 167px; width: 491px;"></textarea>
<span id="rte2_fld_zRep3_parent" class="mceEditor defaultSkin" style="display: block;">
<table id="rte2_fld_zRep3_tbl" class="mceLayout" cellspacing="0" cellpadding="0" style="width: 491px; height: 167px;">
<tbody>
<tr class="mceFirst">…</tr>
<tr class="mceLast">
<td class="mceIframeContainer mceFirst mceLast">
******** id="rte2_fld_zRep3_ifr" src="javascript:""" frameborder="0" style="width: 100%; height: 113px;">
#document
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
****** http-equiv="X-UA-Compatible" content="IE=7">
****** http-equiv="Content-Type" content="text/html; charset=UTF-8">
<style type="text/css">
.img { vertical-align: text-bottom; border: none; }img { border: none; }body { font-style: normal; font-variant: normal;
</style>
</head>
<body id="tinymce" class="mceContentBody " spellcheck="false" dir="ltr">
<p>
“test description”
</p>
</body>
</html>
*********>
</td>
</tr>
Here is the vba code that works on the other fields, and the errors I receive when I try to populate the "Description (Local Language)" field.
Code:
With ieApp.Document.forms(1)
.fld_XName.Value = "Test Title" 'works
.fld_XEntity.Value = "Test" 'works
.fld_XSpecifi.Value = "Test this field" 'works
.fld_XClassif.Value = "SAF" 'works
.fld_zTyp2.Value = 0 'works
.fld_zRep2.Value = "First Name Last Name" 'works
‘.rte14_fld_zRep3.Value = "Test Description" **error 438
‘.fld_zRep3.Value = "Test Description" **no error, but does not populate the field
‘.rte6_fld_zRep3.Value = "Test Description" **error 438
‘.STATUS_fld_zRep3.Value = "Test Description" **error 438
‘.SEC13.Value = "Test Description" **error 438
End With
I don't know how to access this part of the form from the vba. Any help would be much appreciated. Thank you.
<style type="text/css">
.img { vertical-align: text-bottom; border: none; }img { border: none; }body { font-style: normal; font-variant: normal;
</style><style type="text/css">
.img { vertical-align: text-bottom; border: none; }img { border: none; }body { font-style: normal; font-variant: normal;
</style>