none
Pen or Inking API for MS Word RRS feed

  • Question

  • I've a Inking datasource coming from a logical place, So in my MS-Word addin I want to invoke the Pen with the data I've from this logical place.

    It is not a tablet PC, I've the data from this logical device and want to render it on MS word.


    If the word doesn't expose any Inking API, Is there anyway I can do this with Shapes ?

     Is there any available API for this ?


    Also, Is there anyway I mimic this logical device as a table PC Pointing device. So, Microsoft office programs ( Not just Word) works out of the box as they have the incoming inking data coming from the OS.

    To give you more details, I've experimental Device and  I've a application which reads from this device ( It is not a device driver, but it can read the data). Now, I want to enable Inking for Word.





    • Edited by Pratap.k Saturday, March 3, 2012 1:26 PM
    Saturday, March 3, 2012 12:06 PM

Answers

All replies

  • 'Inking' isn't a word that I've heard much (maybe at all) on these forums. What exactly does it mean?

    If it's changing the colour of text, you can do that by obtaining a range, and then getting its 'font' object, and then getting/setting that font's 'color' object.

    Sunday, March 4, 2012 4:15 PM
  • Inking is for Tablet PC or Any pointing Device. This would enable free handwriting on the word. For tablet PC, this functionality comes out of the box. But, I want to write a plugin for this. In case,you want to see what I am talking about, try searching "Inking MS Word" on youtube. Please let me if you need any more details to answer this question.
    • Edited by Pratap.k Tuesday, March 6, 2012 8:01 AM
    Tuesday, March 6, 2012 7:59 AM
  • Okay, I see. As far as I know, unfortunately in Word Microsoft doesn't expose that technology to developers. Wait a bit though, in case I'm wrong. Hopefully someone with more tablet experience will post.
    • Edited by JosephFox Tuesday, March 6, 2012 9:40 AM
    Tuesday, March 6, 2012 9:33 AM
  • I did a little research and found that MS Word just embeddes the Inking as a Bitmaps/shapes.

    So, It seems like, If there is no support for Inking then I can do the same with bitmaps/shapes.Can anyone point me a better way to do this, Also any documents/API ?

    Wednesday, March 7, 2012 7:48 AM
  • Hi Pratap.k,

    Thank you for posting.

    After reading your post, I did some research about the problem. I also found that Word does not provide such Pen or Inking API. I think you can use WPF Ink or Pen API to draw the shape and then save it as pictures.

    http://www.codeproject.com/KB/WPF/Ink1.aspx?fid=426409&df=90&mpp=25&noise=3&sort=Position&view=Quick&select=2545716

    http://www.c-sharpcorner.com/uploadfile/mahesh/working-with-pen-in-wpf/

    Finally, you can add the pictures as InlineShapes via AddPicture method:

    Sub Macro1()
        Selection.InlineShapes.AddPicture FileName:= _
            "C:\Users\v-bpeng\Desktop\test.png", LinkToFile:=False, SaveWithDocument _
            :=True
    End Sub

    Hope this can give you some hint and just feel free to follow up after you have tried.

    Best Regards,


    Bruce Song [MSFT]
    MSDN Community Support | Feedback to us

    • Edited by Bruce Song Thursday, March 8, 2012 6:17 AM
    • Marked as answer by Bruce Song Monday, March 12, 2012 6:59 AM
    Thursday, March 8, 2012 6:16 AM