Solved

Macros for MS-WORD

Posted on 1999-01-18
6
231 Views
Last Modified: 2010-05-03
My problem is like the following.

I want to write a macro for the File Menu - SaveAs menu item.The code will take every character from the word document and convert it to ascci value of thew character+128(for each character).

1.How can I write the macro???
2.How to read and convert each character in the word document to ascii(character)+128.

3.Please give me the code, as I am ignorant about macros.

Thanking u in anticipation,
Baidehish
0
Comment
Question by:bdwibedy
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
6 Comments
 
LVL 70

Expert Comment

by:Éric Moreau
ID: 1469332
Why not simply add a password on your document?

Converting each character (surely possible but I don't know how) can be a heavy job!!!
0
 
LVL 4

Expert Comment

by:mcix
ID: 1469333
Something like this...

Public Sub ConvertToAsciiPlus128()

    Dim mintCurrentChar As Integer
    Dim mintCurrentAsASCII As Integer

    For mintCurrentChar = 1 To ActiveDocument.Characters.Count
        mintCurrentAsASCII = Asc(ActiveDocument.Characters(mintCurrentChar)) + 128
        MsgBox mintCurrentAsASCII
    Next

End Sub

0
 

Accepted Solution

by:
rbcampacci earned 100 total points
ID: 1469334
Something like this...

Public Sub ConvertToAsciiPlus128()

    Dim mintCurrentChar As Integer
    Dim mintCurrentAsASCII As Integer

    For mintCurrentChar = 1 To ActiveDocument.Characters.Count
        mintCurrentAsASCII = Asc(ActiveDocument.Characters(mintCurrentChar)) + 128
        MsgBox mintCurrentAsASCII
    Next

End Sub
0
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

Author Comment

by:bdwibedy
ID: 1469335
Thank you
0
 
LVL 4

Expert Comment

by:mcix
ID: 1469336
Is it me, or did rbcampacci copy my comment and submit it as an answer?
0
 

Expert Comment

by:rbcampacci
ID: 1469337
ok, mcix!!! sorry!!! but don´t forget to send a ANSWER in the next time that you read a question!!!

Thanks!!!

0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Introduction I needed to skip over some file processing within a For...Next loop in some old production code and wished that VB (classic) had a statement that would drop down to the end of the current iteration, bypassing the statements that were c…
Introduction In a recent article (http://www.experts-exchange.com/A_7811-A-Better-Concatenate-Function.html) for the Excel community, I showed an improved version of the Excel Concatenate() function.  While writing that article I realized that no o…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

749 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question