Solved

Macros for MS-WORD

Posted on 1999-01-18
6
185 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
6 Comments
 
LVL 69

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
Enabling OSINT in Activity Based Intelligence

Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

 

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

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

If you have ever used Microsoft Word then you know that it has a good spell checker and it may have occurred to you that the ability to check spelling might be a nice piece of functionality to add to certain applications of yours. Well the code that…
I was working on a PowerPoint add-in the other day and a client asked me "can you implement a feature which processes a chart when it's pasted into a slide from another deck?". It got me wondering how to hook into built-in ribbon events in Office.
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…

746 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

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now