help - writing text to a file

I have some texts files, which i want to read in each line, and then
write back each line to a new text file.

So for example, I want to read in the 2 lines below:


"C:\Data\=D3=EA=D2=B9=D0=C7=BF=D5",6,10,3,3,8
"",0,0,0,318.592,83.04552


I store each line of data in the following vector:


std::vector<CString> FileData;


So FileData[0] =3D ""C:\Data\=D3=EA=D2=B9=D0=C7=BF=D5",6,10,3,3,8"
FileData[1] =3D """,0,0,0,318.592,83.04552"


(the data is in the vector correctly)
Then I go to write the data to a new text file...


FILE * stream;
stream =3D _wfopen(filename, _T("w"));
for(j=3D0;j<FileData.size();j++)
  fwprintf(stream, _T("%s"), FileData[j]);
fclose(stream);


However, when I look at the text file, it's gone wrong:
C:\Data\,0,0,0,318.592,83.0455


I'm doing this in unicode. Is there any obvious problem?

0
Hamish.Dean (174)
4/12/2007 1:31:52 AM
vc.mfc 33608 articles. 0 followers. Follow

16 Replies
579 Views

Similar Articles

[PageSpeed] 25

You could use a CStdioFile to do this easily, not sure about the odd 
characters showing though, but CStdioFile works with Unicode so if you're 
using that you'll be safe with just about anything.

Tom

"hamishd" <Hamish.Dean@gmail.com> wrote in message 
news:1176341512.504862.224870@w1g2000hsg.googlegroups.com...
I have some texts files, which i want to read in each line, and then
write back each line to a new text file.

So for example, I want to read in the 2 lines below:


"C:\Data\��ҹ�ǿ�",6,10,3,3,8
"",0,0,0,318.592,83.04552


I store each line of data in the following vector:


std::vector<CString> FileData;


So FileData[0] = ""C:\Data\��ҹ�ǿ�",6,10,3,3,8"
FileData[1] = """,0,0,0,318.592,83.04552"


(the data is in the vector correctly)
Then I go to write the data to a new text file...


FILE * stream;
stream = _wfopen(filename, _T("w"));
for(j=0;j<FileData.size();j++)
  fwprintf(stream, _T("%s"), FileData[j]);
fclose(stream);


However, when I look at the text file, it's gone wrong:
C:\Data\,0,0,0,318.592,83.0455


I'm doing this in unicode. Is there any obvious problem?

0
tom.nospam (3240)
4/12/2007 3:13:36 AM
Looks like its skipping the first element. Can you verify that its being
written by stepping in. Also, you can use CStdioFile in MFC to read/write
text.

--
Ajay Kalra [MVP - VC++]
ajaykalra@yahoo.com


"hamishd" <Hamish.Dean@gmail.com> wrote in message
news:1176341512.504862.224870@w1g2000hsg.googlegroups.com...
I have some texts files, which i want to read in each line, and then
write back each line to a new text file.

So for example, I want to read in the 2 lines below:


"C:\Data\��ҹ�ǿ�",6,10,3,3,8
"",0,0,0,318.592,83.04552


I store each line of data in the following vector:


std::vector<CString> FileData;


So FileData[0] = ""C:\Data\��ҹ�ǿ�",6,10,3,3,8"
FileData[1] = """,0,0,0,318.592,83.04552"


(the data is in the vector correctly)
Then I go to write the data to a new text file...


FILE * stream;
stream = _wfopen(filename, _T("w"));
for(j=0;j<FileData.size();j++)
  fwprintf(stream, _T("%s"), FileData[j]);
fclose(stream);


However, when I look at the text file, it's gone wrong:
C:\Data\,0,0,0,318.592,83.0455


I'm doing this in unicode. Is there any obvious problem?



0
ajaykalra (6842)
4/12/2007 12:07:29 PM
Hi Hamish,

I just looked at this again and I think the problem is your use of double 
quotes...  I'm surprised this would compile without complaining.  Of course, 
the Unicode string got a little messed up in the message so it's difficult 
to see the original content.  You may want to just try a standard ASCII 
string for testing to see if that helps as well.

see below:

Tom

"hamishd" <Hamish.Dean@gmail.com> wrote in message 
news:1176341512.504862.224870@w1g2000hsg.googlegroups.com...
I have some texts files, which i want to read in each line, and then
write back each line to a new text file.

So for example, I want to read in the 2 lines below:


"C:\Data\��ҹ�ǿ�",6,10,3,3,8
"",0,0,0,318.592,83.04552

"C:\Data\��ҹ�ǿ�",6,10,3,3,8
"",0,0,0,318.592,83.04552

I store each line of data in the following vector:


std::vector<CString> FileData;


So FileData[0] = ""C:\Data\��ҹ�ǿ�",6,10,3,3,8"
***
Change to (note use of backslashes and additional quotes)

"\"C:\Data\��ҹ�ǿ�\",6,10,3,3,8"
***

FileData[1] = """,0,0,0,318.592,83.04552"

***
Change to (note use of backslashes and additional quotes)

FileData[1] = "\"\"",0,0,0,318.592,83.04552"

***


(the data is in the vector correctly)
Then I go to write the data to a new text file...


FILE * stream;
stream = _wfopen(filename, _T("w"));
for(j=0;j<FileData.size();j++)
  fwprintf(stream, _T("%s"), FileData[j]);
fclose(stream);


However, when I look at the text file, it's gone wrong:
C:\Data\,0,0,0,318.592,83.0455


I'm doing this in unicode. Is there any obvious problem?

0
tom.nospam (3240)
4/12/2007 1:53:48 PM
> I just looked at this again and I think the problem is your use of double
> quotes...

Yikes. I missed that too.

---
Ajay

0
ajaykalra (6842)
4/12/2007 2:10:05 PM
Easy to miss... that Unicode rewrite (done by the newsreader during paste no 
doubt) made it kind of like reading an eye test :o)

Tom

"Ajay Kalra" <ajaykalra@yahoo.com> wrote in message 
news:1176387005.117490.6290@q75g2000hsh.googlegroups.com...
>> I just looked at this again and I think the problem is your use of double
>> quotes...
>
> Yikes. I missed that too.
>
> ---
> Ajay
> 

0
tom.nospam (3240)
4/12/2007 2:24:01 PM
On Wed, 11 Apr 2007 20:13:36 -0700, "Tom Serface"
<tom.nospam@camaswood.com> wrote:

>You could use a CStdioFile to do this easily, not sure about the odd 
>characters showing though, but CStdioFile works with Unicode so if you're 
>using that you'll be safe with just about anything.

To me, it seems that CStdioFile is *not* working with Unicode, but
maybe I'm missing something...

However:
I wrote a simple MFC dialog-based app with a list-box.
I put some Unicode strings into the list-box, and then I save them to
file.

Using both OP's method and CStdioFile fail (when you open the file,
the Chinese Unicode characters aren't there).

Instead, I converted the Unicode (Windows UTF-16) to Unicode UTF-8,
and then wrote the UTF-8 buffer to file.
In this way, I can reopen the file with a text editor, and I can see
the Chinese symbols, too.
(BTW: I wrote "Chinese symbols", but I don't know if they are Chinese
or Japanese or something else from Far East :)


Here's the code main code:

<CODE>
void CTestUnicodeTextDlg::OnBnClickedButton1()
{
    //
    // Put some Unicode strings in list
    //
    std::vector<CString> FileData;
    FileData.push_back(L"Ciao");
    FileData.push_back(L"C:\\Test");

    // UTF-16
    WORD chineseChars[] = 
    { 
        0x4E09,
        0x4E0B,
        0x4E11,
        0x0000, 
    };
    FileData.push_back(CString((LPCWSTR) chineseChars));


    //
    // Show strings
    //
    m_List.ResetContent();
    for ( size_t i = 0; i < FileData.size(); i++ )
    {
        m_List.AddString( FileData.at(i) );
    }

    //
    // Write strings to file
    //

    // *** FAILS ***
    // ...Just writes ANSI...??
    //
    CStdioFile file( 
        _T("test_cstdio.txt"), 
        CFile::modeCreate | CFile::modeWrite | CFile::typeText 
    );
    for( size_t i = 0; i < FileData.size(); i++)
    {
        CString line = FileData.at(i);
        line += L"\n";
        file.WriteString( line );
    }

    //
    // Save in UTF-8 format
    //
    FILE * fout = _wfopen( L"test_utf8.txt", L"wb" );
    for( size_t i = 0; i < FileData.size(); i++)
    {
        // Put the new line (\r\n)
        CString line(FileData.at(i));
        line += L"\r\n";

        // Convert from UTF-16 to UTF-8
        CW2U utf8String( line );

        // Send byte data to output file
        fwrite( (LPSTR) utf8String, 1, strlen(utf8String), fout );
    }
    fclose(fout);
    fout = NULL;
}

</CODE>

And here's the CW2U converter:


<CODE>
//----------------------------------------------------------------------------
// Class: CW2UEX
// Descr: Convert from Unicode UTF-16 (WideChars) to Unicode UTF-8
//----------------------------------------------------------------------------
template< int t_nBufferLength = 128 >
class CW2UEX
{
public:
    CW2UEX( LPCWSTR psz ) throw(...) :
        m_psz( m_szBuffer )
    {
        Init( psz );
    }

    ~CW2UEX() throw()
    {
        if( m_psz != m_szBuffer )
        {
            free( m_psz );
        }
    }

    operator LPSTR() const throw()
    {
        return( m_psz );
    }

private:
    void Init( LPCWSTR psz ) throw(...)
    {
        if (psz == NULL)
        {
            m_psz = NULL;
            return;
        }
        int nLengthW    = lstrlenW( psz )+1;

        // One Unicode UTF-16 character could be converted 
        // up to 4 UTF-8 characters
        int nLengthUtf8 = nLengthW * 4;

        if( nLengthUtf8 > t_nBufferLength )
        {
            m_psz = static_cast< LPSTR >( malloc( 
                      nLengthUtf8*sizeof( char ) ) );
            if (m_psz == NULL)
            {
                AtlThrow( E_OUTOFMEMORY );
            }
        }

        if (::WideCharToMultiByte( CP_UTF8, 0, psz, nLengthW, 
            m_psz, nLengthUtf8, NULL, NULL ) == 0)
        {
            AtlThrowLastWin32();
        }
    }

public:
    LPSTR m_psz;
    char m_szBuffer[t_nBufferLength];

private:
    CW2UEX( const CW2UEX& ) throw();
    CW2UEX& operator=( const CW2UEX& ) throw();
};

typedef CW2UEX<> CW2U;


</CODE>

MrAsm
0
mrasm (715)
4/12/2007 3:27:40 PM
On 11 Apr 2007 18:31:52 -0700, "hamishd" <Hamish.Dean@gmail.com>
wrote:

>However, when I look at the text file, it's gone wrong:
>C:\Data\,0,0,0,318.592,83.0455
>
>
>I'm doing this in unicode. Is there any obvious problem?

I did some test, and I get the same result (Unicode characters were
"killed", also using CStdioFile [*]).

You might consider my post below in this thread, in which I posted
some code that seems to work (Unicode characters are preserved). I
used Unicode UTF-8 for this.

MrAsm

[*] I'm not a Unicode expert, and maybe I missed something from
CStdioFile or somewhere else.
To be sure about CStdioFile and Unicode not working correctly, better
waiting some expert's post like Mihai's sentences.
0
mrasm (715)
4/12/2007 3:33:18 PM
CStdioFile will work with Unicode if your program is compiled with Unicode. 
It won't work with UTF-8 at this point.

Tom

"MrAsm" <mrasm@usa.com> wrote in message 
news:ngjs13d3itofk9h8qlp7tcsfjs4l1f1aij@4ax.com...
> On Wed, 11 Apr 2007 20:13:36 -0700, "Tom Serface"
> <tom.nospam@camaswood.com> wrote:
>
>>You could use a CStdioFile to do this easily, not sure about the odd
>>characters showing though, but CStdioFile works with Unicode so if you're
>>using that you'll be safe with just about anything.
>
> To me, it seems that CStdioFile is *not* working with Unicode, but
> maybe I'm missing something...
>
> However:
> I wrote a simple MFC dialog-based app with a list-box.
> I put some Unicode strings into the list-box, and then I save them to
> file.
>
> Using both OP's method and CStdioFile fail (when you open the file,
> the Chinese Unicode characters aren't there).
>
> Instead, I converted the Unicode (Windows UTF-16) to Unicode UTF-8,
> and then wrote the UTF-8 buffer to file.
> In this way, I can reopen the file with a text editor, and I can see
> the Chinese symbols, too.
> (BTW: I wrote "Chinese symbols", but I don't know if they are Chinese
> or Japanese or something else from Far East :)
>
>
> Here's the code main code:
>
> <CODE>
> void CTestUnicodeTextDlg::OnBnClickedButton1()
> {
>    //
>    // Put some Unicode strings in list
>    //
>    std::vector<CString> FileData;
>    FileData.push_back(L"Ciao");
>    FileData.push_back(L"C:\\Test");
>
>    // UTF-16
>    WORD chineseChars[] =
>    {
>        0x4E09,
>        0x4E0B,
>        0x4E11,
>        0x0000,
>    };
>    FileData.push_back(CString((LPCWSTR) chineseChars));
>
>
>    //
>    // Show strings
>    //
>    m_List.ResetContent();
>    for ( size_t i = 0; i < FileData.size(); i++ )
>    {
>        m_List.AddString( FileData.at(i) );
>    }
>
>    //
>    // Write strings to file
>    //
>
>    // *** FAILS ***
>    // ...Just writes ANSI...??
>    //
>    CStdioFile file(
>        _T("test_cstdio.txt"),
>        CFile::modeCreate | CFile::modeWrite | CFile::typeText
>    );
>    for( size_t i = 0; i < FileData.size(); i++)
>    {
>        CString line = FileData.at(i);
>        line += L"\n";
>        file.WriteString( line );
>    }
>
>    //
>    // Save in UTF-8 format
>    //
>    FILE * fout = _wfopen( L"test_utf8.txt", L"wb" );
>    for( size_t i = 0; i < FileData.size(); i++)
>    {
>        // Put the new line (\r\n)
>        CString line(FileData.at(i));
>        line += L"\r\n";
>
>        // Convert from UTF-16 to UTF-8
>        CW2U utf8String( line );
>
>        // Send byte data to output file
>        fwrite( (LPSTR) utf8String, 1, strlen(utf8String), fout );
>    }
>    fclose(fout);
>    fout = NULL;
> }
>
> </CODE>
>
> And here's the CW2U converter:
>
>
> <CODE>
> //----------------------------------------------------------------------------
> // Class: CW2UEX
> // Descr: Convert from Unicode UTF-16 (WideChars) to Unicode UTF-8
> //----------------------------------------------------------------------------
> template< int t_nBufferLength = 128 >
> class CW2UEX
> {
> public:
>    CW2UEX( LPCWSTR psz ) throw(...) :
>        m_psz( m_szBuffer )
>    {
>        Init( psz );
>    }
>
>    ~CW2UEX() throw()
>    {
>        if( m_psz != m_szBuffer )
>        {
>            free( m_psz );
>        }
>    }
>
>    operator LPSTR() const throw()
>    {
>        return( m_psz );
>    }
>
> private:
>    void Init( LPCWSTR psz ) throw(...)
>    {
>        if (psz == NULL)
>        {
>            m_psz = NULL;
>            return;
>        }
>        int nLengthW    = lstrlenW( psz )+1;
>
>        // One Unicode UTF-16 character could be converted
>        // up to 4 UTF-8 characters
>        int nLengthUtf8 = nLengthW * 4;
>
>        if( nLengthUtf8 > t_nBufferLength )
>        {
>            m_psz = static_cast< LPSTR >( malloc(
>                      nLengthUtf8*sizeof( char ) ) );
>            if (m_psz == NULL)
>            {
>                AtlThrow( E_OUTOFMEMORY );
>            }
>        }
>
>        if (::WideCharToMultiByte( CP_UTF8, 0, psz, nLengthW,
>            m_psz, nLengthUtf8, NULL, NULL ) == 0)
>        {
>            AtlThrowLastWin32();
>        }
>    }
>
> public:
>    LPSTR m_psz;
>    char m_szBuffer[t_nBufferLength];
>
> private:
>    CW2UEX( const CW2UEX& ) throw();
>    CW2UEX& operator=( const CW2UEX& ) throw();
> };
>
> typedef CW2UEX<> CW2U;
>
>
> </CODE>
>
> MrAsm 

0
tom.nospam (3240)
4/12/2007 3:56:40 PM
On Thu, 12 Apr 2007 08:56:40 -0700, "Tom Serface"
<tom.nospam@camaswood.com> wrote:

>CStdioFile will work with Unicode if your program is compiled with Unicode. 

Of course, the program was compiled with Unicode.

MrAsm
0
mrasm (715)
4/12/2007 4:29:10 PM
On Thu, 12 Apr 2007 08:56:40 -0700, "Tom Serface"
<tom.nospam@camaswood.com> wrote:

>CStdioFile will work with Unicode if your program is compiled with Unicode. 
>It won't work with UTF-8 at this point.

To make it clear: my program was compiled with Unicode (= UTF-16), of
course.
And it seems that CStdioFile did not work with Far East symbols (you
have the code, you can see yourself if you want - maybe I missed
something? But it is not the Unicode compilation :).

And I can have UTF-8 also with Unicode builds. In fact, UTF-8 is just
a byte array, and I wrote that array to file just using a raw C
fwrite() to send the byte buffer to file.

MrAsm
0
mrasm (715)
4/12/2007 4:34:11 PM
Hi,

I always have a problem when I don't open the file in the correct mode.
binary/text rd/wr etc.

I noticed something similar in the way you were opening the file.
It seems it need a Unicode specifier.

fopen("newfile.txt", "rw, ccs=3D<encoding>");=20
stream =3D _wfopen(filename, _T("w"));

http://msdn2.microsoft.com/en-us/library/yeby3zcb(VS.80).aspx

P.S. I am not sure if "w" needs be unicode.

HTH,
0
Nobody530 (222)
4/12/2007 10:37:47 PM
"MrAsm" <mrasm@usa.com> wrote in message 
news:8mns13t396jbk6kr5h602i7ut03r0m7epn@4ax.com...

> To make it clear: my program was compiled with Unicode (= UTF-16), of
> course.
> And it seems that CStdioFile did not work with Far East symbols (you
> have the code, you can see yourself if you want - maybe I missed
> something? But it is not the Unicode compilation :).

I played with this a while back.  I seem to remember that under UNICODE 
CStdioFile still reads files containing the old single byte characters, but 
puts them in strings of wide characters (presumably using the default 
codepage of the computer).  Is this not what it is supposed to do?

Dave
-- 
David Webber
Author MOZART the music processor for Windows -
http://www.mozart.co.uk
For discussion/support see
http://www.mozart.co.uk/mzusers/mailinglist.htm


0
dave1 (356)
4/12/2007 11:01:26 PM
Asm,

Is that a good email address, if not send me a note at mine, minus the 
..nospam part and I'll send you a couple of files with a replacement for 
CStdioFile that I use that will do Unicode or UTF-8 based on a create flag.

Tom

"MrAsm" <mrasm@usa.com> wrote in message 
news:8mns13t396jbk6kr5h602i7ut03r0m7epn@4ax.com...
> On Thu, 12 Apr 2007 08:56:40 -0700, "Tom Serface"
> <tom.nospam@camaswood.com> wrote:
>
>>CStdioFile will work with Unicode if your program is compiled with 
>>Unicode.
>>It won't work with UTF-8 at this point.
>
> To make it clear: my program was compiled with Unicode (= UTF-16), of
> course.
> And it seems that CStdioFile did not work with Far East symbols (you
> have the code, you can see yourself if you want - maybe I missed
> something? But it is not the Unicode compilation :).
>
> And I can have UTF-8 also with Unicode builds. In fact, UTF-8 is just
> a byte array, and I wrote that array to file just using a raw C
> fwrite() to send the byte buffer to file.
>
> MrAsm 

0
tom.nospam (3240)
4/13/2007 4:27:29 AM
On Thu, 12 Apr 2007 21:27:29 -0700, "Tom Serface"
<tom.nospam@camaswood.com> wrote:

>Asm,
>
>Is that a good email address, 

Yes my e-mail address is good.


>if not send me a note at mine, minus the 
>.nospam part and I'll send you a couple of files with a replacement for 
>CStdioFile that I use that will do Unicode or UTF-8 based on a create flag.

Thank you.

And what about this?

http://www.codeproject.com/file/stdiofileex.asp

So am I right about the MFC CStdioFile error?
:)


MrAsm
0
mrasm (715)
4/13/2007 8:06:03 AM
Hi, I got your email and I'll send my revised version of that class you 
mentioned below in a few minutes via email.  I needed to support Unicode or 
UTF-8 or ANSI based on BOM in the file.  I don't use the libary version of 
CStdioFile any more, but I could have sworn it was supposed to work with 
Unicode in a Unicode build, but ...

Tom

"MrAsm" <mrasm@usa.com> wrote in message 
news:raeu13hnkunsbd6e4usle63qqop5pq8nfj@4ax.com...
> On Thu, 12 Apr 2007 21:27:29 -0700, "Tom Serface"
> <tom.nospam@camaswood.com> wrote:
>
>>Asm,
>>
>>Is that a good email address,
>
> Yes my e-mail address is good.
>
>
>>if not send me a note at mine, minus the
>>.nospam part and I'll send you a couple of files with a replacement for
>>CStdioFile that I use that will do Unicode or UTF-8 based on a create 
>>flag.
>
> Thank you.
>
> And what about this?
>
> http://www.codeproject.com/file/stdiofileex.asp
>
> So am I right about the MFC CStdioFile error?
> :)
>
>
> MrAsm 

0
tom.nospam (3240)
4/13/2007 2:37:17 PM
On Fri, 13 Apr 2007 07:37:17 -0700, "Tom Serface"
<tom.nospam@camaswood.com> wrote:

>Hi, I got your email and I'll send my revised version of that class you 
>mentioned below in a few minutes via email.  

Hi Tom, your class does work also with my Chinese test example!

(I've replyed to your e-mail.)

I think your class is the working version to replace the MFC
CStdioFile. Your class could be useful for the OP, too.
And maybe you could write a knowledge-base for Microsoft about that
issue.

MrAsm
0
mrasm (715)
4/13/2007 4:08:29 PM
Reply:

Similar Artilces:

How can I open a file saved in Pub 2000 version 6 in Pub 2000 ver.
The file is saved in Publisher 2000 v6 and I am trying to open it with Publisher 2000 v9. can this be done? Hi LaTrice (LaTrice @discussions.microsoft.com), in the newsgroups you posted: || The file is saved in Publisher 2000 v6 and I am trying to open it || with Publisher 2000 v9. can this be done? No. There is no such thing as Publisher 2000 v9, nor is there a version 9 of Publisher, yet. Verify the version of Publisher that you have, and also verify the version of Publisher that you received the file from then post back. -- Brian Kvalheim Microsoft Publisher MVP http://www.publi...

Excel Text Function
Hi anyone who can help me... I have some info in a spreadsheet as follows: A1 B1 C1 Centra Dublin Centra Belfast Centra London If I want to get just Centra out into another cell I would use =LEFT(A1:C1,6) and this works fine. But I want to actually get out the area - Dublin, Belfast or London and some other areas that might have more or less than 7 letters. Any ideas??? Thanks in advance Ann (Dublin, Ireland) =TRIM(SUBSTITUTE(A1,"Centra","")) will work if you have city names and centra.. -- Regards, Peo Sjoblom "Ann&q...

web address help
whats the web address for outlook so i can sign on? I have it stored on my home computer but dont have it here thanks Outlook doesn't have a web address unless you use an Exchange server. -- Diane Poremsky [MVP - Outlook] Author, Teach Yourself Outlook 2003 in 24 Hours Coauthor, OneNote 2003 for Windows (Visual QuickStart Guide) Outlook Tips: http://www.outlook-tips.net/ Outlook & Exchange Solutions Center: http://www.slipstick.com <anonymous@discussions.microsoft.com> wrote in message news:64da01c3e61b$58282fc0$a401280a@phx.gbl... > whats the web address for outlook...

help installing exchange 2000 in one of 3 sites
I have a domain cotoso.com installed and configured as AD for 3 companies interlinked together. and + a total of 3 DC in 3 different sites that are connected by VPN. i have exchange installed in each site connected on the same domain contoso.Local(+ E-mail -->contoso.com) + hosting their own companie domain name such as x.com or y.co or z.com for each company. I have a routing link configured + 3 administrative groups in exchange system manger for each company. one DC in one site that also has exchange 2000 installed on it has to be changed because of poor performance. now i'm ...

HELP!! Viewing email images
I have just recently switched to using Outlook rather than Outlook Express as my email program. I now find that any image attachments (.jpg, .bmp etc.) I receive are not visible onscreen as they used to be in Outlook Express. I have to click on each attachment icon to view... It's annoying, especially if I get a series of pics...I have to manually ope each one... Does anyone know how to set Outlook so that it shows me these images onscreen??? Many Thanks, Darren. ...

Stagger X-axis text
In 1-2-3 I could stagger the text in the X-axis. In Excel it seems that I can only rotate the text to 90 degrees. Is there a way to stagger and leave horizontal? Specifically, I have all the provinces (or 10 of them) across the axis and they take up room when spelt out (no abbreviations allowed). I would rather the first, third, fifth ... etc. be higher and the second, fourth etc. be lower to allow the chart to be narrower and still read the text clearly. Cheers, Deborah >-----Original Message----- >In 1-2-3 I could stagger the text in the X-axis. In Excel it seems Deborah I would...

Need help getting this code to compile under VS.NET 2003 (compiles under VS6.0).
I'm tasked with converting a LARGE project from VS6.0 to VS.NET 2003. Here is a VERY scaled down version of an error I'm getting. I must be getting rusty, but the way to get around this compiler error is just not coming to me. If you need to compile this, just create a Win32 console app and specify to add support for MFC, then copy this code into the cpp file and press compile. class CLogItem : public CObject { protected: virtual BOOL CheckConflict(CLogItem* pItem) const; }; struct MapEntry; //forward declaration.. typedef CArray<MapEntry, MapEntry&> CMapEntryArray;...

Outlook 2003
Is there a way to force all incoming email to be received as plain text in OL-2003? TIA -- howard How about: "Tools | Options | E-Mail Options | Read all standard mail in plain text"? -- Aloha, -Ben- Ben M. Schorr, OneNote-MVP Stockholm Consulting Group/KSG http://www.scgab.com Microsoft OneNote FAQ: http://home.hawaii.rr.com/schorr/computers/onenotefaq.htm **I apologize but I am unable to respond to direct requests for assistance. Please post questions and replies here in the newsgroup. Mahalo! "Howard Cross" <no-spam@No-Spam.com> wrote in message ...

Numbers in a text field-can I add them up?
Hi everyone! Using A02 on XP. I have a table of data with survey response fields that contain a 0,1,2,3,4 or 5. However, the fields are formatted as text, not numbers. I need to add up certain blocks (Items 1-6, Items 7-23, etc.) and then do some averaging. I cannot change the field types from text. Must I append to a new table or can I do something right in my query? I've got one field in my query like this: ES: [Item1]+[Item2]+[Item3]+[Item4]+[Item5]+[Item6] My result is: 553453 or 554444, etc. I want: 25 or 22, etc. I would really appreciate any help or advice. Thanks...

help!! smtp protocol error occurred
exchange 2000 srv/windows 2k srv smtp protocol error occurred when trying to send mails. receives fine. Still waiting for some relavent information so we can help you solve your problem. >-----Original Message----- >exchange 2000 srv/windows 2k srv >smtp protocol error occurred when trying to send mails. >receives fine. > > >. > I had that problem, I telneted into the servers that the error occurred and found I was on a blacklist. Had to sumit to an open relay test, and bam, no more problems. ...

exporting a report in text
I have data in one table for which I have created formatted reports - 1 by program number and 1 by last name. I have the reports the way I want them to look. I need to have them in text-delimited format. The reason for this is that I need to be able to upload them into a DREAMWEAVER table. If they are in the text-delimited format I can upload all the reports fairly easily. Otherwise, I have to export them to WORD as a table, and then laboriously upload them to Dreamweaver column by column as DW will not accept the whole report. (It is doable, but not too convenient. Than...

Help !!!!
I was migration my Exchange 2000 to 2003 I do my forest prep and domain prep But i can't create mailboxes ??? Why??? some documentation please... What actually happens? What error do you get? -- Neil Hobson Exchange MVP For Exchange news, links, and tips, check: http://www.msexchangeblog.com "A.dian�" <Adian@discussions.microsoft.com> wrote in message news:31CB593F-F4DD-4CAB-9F4E-C2131BF7CF95@microsoft.com... > I was migration my Exchange 2000 to 2003 I do my forest prep and domain prep > But i can't create mailboxes ??? > Why??? > some documentation...

How do I get excel to accept (c) as text and not change to copyri.
How do I enter the text (c) in Excel without having it changed into the copyright symbol? Hi Daffyd, Try: Tools | Autocorrect | Select (c) | Delete | OK --- Regards, Norman "daffyd" <daffyd@discussions.microsoft.com> wrote in message news:8CCC3C1A-6F19-4F62-B934-8A71F236A4FD@microsoft.com... > How do I enter the text (c) in Excel without having it changed into the > copyright symbol? Go into the Tools Menu. Look for AutoCorrect. In the bottom half of the AutoCorrect Tab, look at the list for Replace text as you type. Delete the entry for (c). tj "da...

automatically naming files for savingb
Hi, for delivery notes i would like excel to look in the relative directory for a given customer, ie if C4 contains superspecs, files relating to this account would be in c:\work\superspecs\ files are named superspecsdel0001,superspecsdel0002.......etc superspecsinv0001...etc for delivery notes and invoices. what i would like is a line (or more) to add to a macro which will look in the appropriate directory, add 1 to the last four digits of the last file, enter this number into a cell on the sheet and save the new file with the appropriate name, then close the file. is this possible, or alte...

why do changes only save locally on networked excel file?
why do changes only save locally on networked excel file? ...

Help ! formatting data to text
I am creating data in an Excel spreadsheet. I then want to get that data into a simple text email. I have some problems and questions... 1) how do I get the columns of data to line up evenly when I copy the data to email text ? Keep in mind I need to be in simple text format, not HTML or rich text. Every time I do this, all columns become chaos and are unreadable. 2) Is there a simple way to automate the creation of an email from an excel file ? this is less important to me. Thanks in advance WxMachine #1. I think it may have to do with what email client you use, too. I copy and ...

form and query problem. please help.
All tables are linked with weak entities. However, when i enter data on the form I can't get it to let me enter more than one partipicant without access generating a new invoice id. however i need one invoice to many participants. It wont work and i have no idea what to do at this point. in addition the workshop will not let me add workshop to invoice. this is a small mdb and i'd like to email it to anyone who can assist me with the relationships as I think this is the problem but I don't know what to do. please help me. INVOICE invoiceNO - autonumber invoice prices WORKSHOP wo...

VISIO 2007 -Text direction
can some one tell me how to change text to be type in vertically. Under tools, options there is no regional tab or under format text the change text direction command does not work. "kgbrat" <kgbrat@discussions.microsoft.com> wrote in message news:2DBF18B5-E1C8-4493-8BEF-F7D4C1538781@microsoft.com... > can some one tell me how to change text to be type in vertically. Under > tools, options there is no regional tab or under format text the change > text > direction command does not work. You can use the Text Tool (The A with an circular arrow around it) and gr...

To write living will do I need special format
I just need to change and update a living trust You should consult someone with the appropriate legal knowledge in the jurisdiction in which you are domiciled. -- Hope this helps. Please reply to the newsgroup unless you wish to avail yourself of my services on a paid consulting basis. Doug Robbins - Word MVP, originally posted via msnews.microsoft.com "belladonna" <belladonna@discussions.microsoft.com> wrote in message news:F25A64CB-355F-44E9-A005-16AA61DA15A7@microsoft.com... > I just need to change and update a living trust ...

write Macro or DLL to copy data from worksheet to memory
Hi, I would like to write some functions in Macro or DLL so that I can copy some data from Excel sheet into memory so that I can call back from other Excel sheets or macros. It works as a global variable array, something like that. Thanks If you must use global variables... Option Explicit Dim myArr As Variant Sub loadMyArr() myArr = Range(Range("A1"), Range("A1").End(xlDown)) End Sub The above code puts the contents of the current region of A1 in the active sheet into the variable myArr. myArr will be a 2-D array that you can loop through with code such a...

Newbe help with a lookup
Hi, I&#8217;m trying to make some modifications to a salary matrix and I&#8217;m having trouble with a lookup. In column A I have a series of numbers from 0 to 30 representing pay grade steps where 0 represents a new employee and 30 represents an employee having completed 30 years of service. In column B I have an annual salary for each of the corresponding pay grade steps. I want to take a new salary and find the closest salary in column B and return the corresponding step number. For example if the new salary is $73,415.13 and the matrix shows step 15 is 73,205 and step 16 is 73...

HELP
We have an application that is used by over 8000 people worldwide. One of our users is just starting to have the following problem: Run-time error '-2147467259(80004005)': Method 'Add' of object 'CommandBarControls' failed I have read that this problem can be caused by trying to open the file in Internet Explorer. The user has told me that she has tried opening MS Excel and then the .xls file and she still gets the same problem when the file is trying to open. She is the only one that has had this problem. Could there be something wrong with her Excel settings or som...

Outlook should keep files in the clipboard after closing a window
When you open a message (in a new window) in Outlook 2007, and copy one or more files contained in this message, and then close the window, the file is not kept in the clipboard. I have to copy the file and paste it before closing the window. ---------------- This post is a suggestion for Microsoft, and Microsoft responds to the suggestions with the most votes. To vote for this suggestion, click the "I Agree" button in the message pane. If you do not see the button, follow this link to open the suggestion in the Microsoft Web-based Newsreader and then click "I ...

Deleted file in Outlook
I accidentaly deleted a folder in Outlook 2003 and am wondering if it possible to retreive it. Thank you, Karl youthminman@yahoo.com <youthminman@yahoo.com> wrote: > I accidentaly deleted a folder in Outlook 2003 and am wondering if it > possible to retreive it. Unless you permanently deleted it (i.e., held down Shift when pressing Delete), it will be in your Deleted items folder, unless you've emptied that folder. If you have emptied it, other suggestions depend on knowing what data store you're using (PST or Exchange mailbox). -- Brian Tillman ...

Help with keeping inventory.
Hello Everyone. I was wondering if someone might be able to help me. I'm trying t come up with a way to keep inventory of product. Basically what I need is to keep track of the current inventory of items... and what I'd like is for different users to be able to ope the worksheet and enter the NUMBER OF PRODUCT they are removing at tha time.... and for the total inventory of each item to be adjuste accordingly. The only catch is - I'd like to be able to use the SAM CELL always -- that is - I want only one cell to be the one that i used to enter the amount of inventory being o...