VB macro to superpose characters
Results 1 to 10 of 10

Thread: VB macro to superpose characters

  1. #1
    Registered User
    Join Date
    Jan 2001
    Posts
    339

    VB macro to superpose characters

    I create macros using the macro recorder of Word. One thing I could not do is when I wanted to superpose two characters, e.g. letter A and a symbol atop of it.

    Currently I do this by typing the letter, say A, sometimes a group of letters, such as PQR, in a textbox, and the symbol in another textbox then top one box by the other then group them to create a new object. Then place the object in the desired location in the text. The draw back, if I make a change in the text, the object does not follow the text. I will have to search it on the page and put it back in the new location.

    Is there a VB macro I could incorporate with Word to do the job?

  2. #2
    Driver Terrier NooNoo's Avatar
    Join Date
    Dec 2000
    Location
    UK
    Posts
    31,824
    So what you want is a macro to create a text box? Or a macro to place an existing text box on the page?

  3. #3
    Registered User
    Join Date
    Jan 2001
    Posts
    339
    I can create a textbox by the macro recorder. That's not a problem for as long as whatever macro I record it can be done without macro.

    My request is similar to this: if you wanted to create è in Word, you could use Alt plus the ascii code for the character. Alternatively, hold Ctrl key, press `, release Ctrl key and type e. Automatically the character e is shifted underneath `.

    Now if I wanted to create a character other than the special characters embedded in Word, the procedure of è doesn’t work. I think there must be a way to do it with an appropriate macro VB script. How to do it?

  4. #4
    Driver Terrier NooNoo's Avatar
    Join Date
    Dec 2000
    Location
    UK
    Posts
    31,824
    Use insert symbol....

  5. #5
    Registered User
    Join Date
    Jan 2001
    Posts
    339
    That will place the symbol next to the character. How to shift the symbol to the right (or to the left) atop the existing character whithout deleting the existing character.

  6. #6
    Chat Operator Matridom's Avatar
    Join Date
    Jan 2002
    Location
    Ontario, Canada
    Posts
    3,778
    you would need to find the relevant ascii character. Word can`t create new characters on the "fly"

    for example è is actualy 1 ascii character, the accent is also found on different letters like à or ò. you are not combining ` with e and make a new unknown character, you are telling the keyboard to make an ascii è using two seperate keys.

    What I think you are currently doing is creating a new IMAGE of a fictional character that will be put into your text. That is why it won`t shift with the rest of the text, Word is treating differently.
    <Ferrit> Take 1 live chicken, cut the head off, dance around doing the hokey pokey and chanting: GO AWAY BAD VIRUS, GO AWAY BAD VIRUS
    -----------------------
    Windows 7 Pro x64
    Asus P5QL Deluxe
    Intel Q6600
    nVidia 8800 GTS 320
    6 gigs of Ram
    2x60 gig OCZ Vertex SSD (raid 0)
    WD Black 750 gig
    Antec Tri power 750 Watt PSU
    Lots of fans

  7. #7
    Registered User
    Join Date
    Jan 2001
    Posts
    339
    I understand this is what is happening. A built in VB script in Word causes the character to shift atop the other. This is exactly is what I am asking for.

    Suppose you typed A, ascii code 65 of say Times Roman, then you want to superimpose it to the character Euclid Extra its code in Word is 61628 and you wanted to shift the Euclid character atop A. What is the VB script that could be added as macro in Word to do the job.

  8. #8
    Driver Terrier NooNoo's Avatar
    Join Date
    Dec 2000
    Location
    UK
    Posts
    31,824
    Err no it doesn't, not as such...

    Go to insert symbol and you will find that
    a) It uses unicode not ascii
    b) Every symbol has a unicode character
    c) Different fonts support different symbols

    Then you can use a "macro" - assign a hot key to those symbols you use regularly. Everything is a symbol whether it is an alphanumeric or a special character, an accented character or just plain old punctuation symbols.

  9. #9
    Registered User
    Join Date
    Jan 2001
    Posts
    339
    Here is a picture of what I am asking for: ABC are regular Times Roman, the arc atop of them is Euclid Extra symbol. I created this using two textboxes atop each other.
    Attached Images Attached Images

  10. #10
    Driver Terrier NooNoo's Avatar
    Join Date
    Dec 2000
    Location
    UK
    Posts
    31,824
    OK, so you can insert the arc as a symbol and put the letters in the text box..
    The euclid extra symbols are designed to be used with insert object - select the equation editor...

Similar Threads

  1. help needed with excel macro
    By shaltar in forum Microsoft Office
    Replies: 3
    Last Post: November 24th, 2003, 05:01 PM
  2. Setting a proxy server in Excel using a VB macro
    By CeeBee in forum Microsoft Office
    Replies: 0
    Last Post: October 8th, 2003, 08:03 PM
  3. VB Form layout issue
    By delmer_1 in forum Programming And Web Design
    Replies: 2
    Last Post: August 12th, 2003, 03:23 PM
  4. HELP ME HELP ME HELP ME! VB & Crystal Reports
    By opiate in forum Programming And Web Design
    Replies: 1
    Last Post: December 4th, 2001, 03:39 AM
  5. [RESOLVED] SQL or VB??
    By elhit in forum Programming And Web Design
    Replies: 10
    Last Post: March 27th, 2001, 07:30 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •