473,666 Members | 2,087 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Bizarre formatting issues building text email with VBScript

2 New Member
I'm working with VBScript to build a text email message. I'm seeing a variety of bizarre formatting issues. The following lines of code

MT = MT & vbCrLf & "Card Type: " & CardType
MT = MT & vbCrLf & "Credit Card Number: " & objBOWallet.Enc rypt(Payment.[_account_number])
If Not IsNull(Payment.[_expiration_mon th]) Then
MT = MT & vbCrLf & "Expiration Month: " & Payment.[_expiration_mon th]
End If
If Not IsNull(Payment.[_expiration_yea r]) Then
MT = MT & vbCrLf & "Expiration Year: " & Payment.[_expiration_yea r]
End If
MT = MT & vbCrLf & "Payment Amount: " & Context.DataFun ctions.Money(Pa yment.payment_a mount)

results in the following text in the email:

Card Type: Visa
Credit Card Number: ?Hn<j;?AKPBROcT YPSiUjk Expiration Month: 7 Expiration Year: 2008 Payment Amount: $25.34

with Space characters where there should be CRLF characters. Changing the second line from
MT = MT & vbCrLf & "Credit Card Number: " & objBOWallet.Enc rypt(Payment.[_account_number])
to
MT = MT & vbCrLf & "Credit Card Number: " & Tab(1) & objBOWallet.Enc rypt(Payment.[_account_number])
(adding the Tab(1)) "fixes" the problem, but I can't see why. Why would a Tab character in one line impact the CRLF characters in three subsequent lines?

The most recent behavior is, to me, even more bizarre as I am now getting CRLF characters appearing in the middle of what are string literals in the code. For example, the following code

If Not IsNull(OrderFor m.advcode) Then
MT = MT & vbCrLf & "Affilate or Advertising code:" & Tab(1) & Trim(OrderForm. advcode)
End If
If Not IsNull(OrderFor m.Special_Offer ) Then
MT = MT & vbCrLf & "Special Offer Code:" & Tab(1) & Trim(OrderForm. Special_Offer)
End If
MT = MT & vbCrLf & "Order Number:" & Tab(1) & OrderForm.Order Number

results in the following text in the email:

Affilate or Advertising code:Special
Offer Code:Order
Number: 10100625021

Instead of getting CRLF characters before the "Special Offer Code:" and "Order Number:" strings, there are CRLF characters inserted into the middle of each string. I can't make head nor tails of what's going on. Has anyone seen anything like this???
Oct 10 '06 #1
1 2690
zoehart
2 New Member
Never mind. I had my VBScript right the text out to a file and found that it was correctly formatted. Somewhere in the mail processing (mail server, mail client, SMTP stack) it's getting messed up. Not sure there's much I can do about that.
Oct 10 '06 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

3
1589
by: joe ruggeri | last post by:
Hey All ... I'm developing in ASP/VBScript using DreamweaberMX, w/ an Access 2000 DB as the data source. The source of the data is coming from a third party, which I get as a CSV and import into the database, updating it weekly. Since I have no control over how the data is collected, I'm not sure how to fix this problem, but here it is. This is a database of movies and among the many fields I import is one for the
8
558
by: the other john | last post by:
I have a client that wants a time field to resolve to 7:00 PM rather than 7:00:00 PM (wants the seconds gone). vbLongTime provides the later but vbShortTime produces a 24 hour version or 19:00. Any suggestions? Thanks!
4
2128
by: Wayne Aprato | last post by:
I have a simple database which was originally written in Access 97. When converted to Access 2000 file format it ran flawlessly in Access 2002. I've just tried to run it in Access 2003 and I am seeing the following behaviour: Some of the fields on the continuous main form which is a list of jobs with their related details "flicker". While this is going on the form seems to function as it should and isn't locked up. If I click and hold...
12
2345
by: dmieluk | last post by:
Problem: When moving between records, I need to control which combo/text boxes are displayed on the current form, dependent upon data in the current record. More: I building my first access database.
3
3327
by: WU10 | last post by:
I have built a simple database to track the mechanical condition of offshore equipment. We established a system of ranking for issues that arise and used conditional formatting of the cell's background to make these issues visible. White cell (default) indicates "No Issue", Green "Low", Yellow "Medium" and Red "High". This is currently woking fine. Recently our corporate gurus have now come up with a 4th color, Amber "Significant"...
3
3581
by: Don Miller | last post by:
I have a bizarre problem when I try to validate XML documents and their schemas once they have been opened and transfered to a Visual Web Developer 2005 Express project. I receive validation errors for XML/XSDs that worked fine when first created in another environment (XMLSpy trial). I have a source XML document and an XSD file created wtih XMLSpy and stored in a separate folder. When I run a very simple VBScript to validate the XML...
10
2132
by: sara | last post by:
Hi - I have a report that is 14 columnar sub-reports (Line up: Position- holders in each of our 14 locations - Manager, Assistant Manager, Receiving, Office, etc). I output directly to PDF (using ConvertReportToPDF from this site - Stephan Lebans) The formatting - Outlines on some fields - do not appear on subreports
1
1507
by: dbuchanan | last post by:
I want to fill a textbox or a label or with lines from a listbox. I want to preserve the lline for line as it comes from the list box. I do not want the test to run-on. I suppose it is okay to wrap if it is longer than the width of the control. This data will later be taken from this control and put into a text box in a report in ReportViewer where I will want to preserve the same formating there. Thank you,
6
1588
by: =?Utf-8?B?UVNJRGV2ZWxvcGVy?= | last post by:
I am using a RichTextControl (C# VS2005 .NET 2.0) and allowing users to change the font and color of what ever they select. The problem I am having is that when I select a second set of character and change the font and or color the Font and color from the previous change is lost. This is the code that handles the change private void ChangeFont() { if (InvokeRequired) {
0
8449
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8360
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8876
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8784
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8556
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8642
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
6198
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
4198
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
2
1777
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.