?
Solved

How to reference Ink objects in Word VBA

Posted on 2006-04-07
6
Medium Priority
?
505 Views
Last Modified: 2008-02-01
Hi,

I wasn't sure whether to put this question here or in the Word category, forgive me if I chose wrong.

I want to write a Word macro that will clear all Ink Annotation on a Word 2003 document on a Tablet PC.

I'm not sure what the objects are, and can't find them in the Object Browser.
Can anyone enlighten me?

Many Thanks
Janine
0
Comment
Question by:janineo
  • 4
  • 2
6 Comments
 
LVL 8

Expert Comment

by:dds110
ID: 16403173
This should do it for ya (I think)

Function hide_ink()
ActiveDocument.ActiveWindow.View.ShowInkAnnotations = False
End Function
0
 

Author Comment

by:janineo
ID: 16415308
Sorry, not quite what I was after.

I have a document which I'm using the Ink Annotations so it can be signed by someone.
I want to add a toolbar which has a 'clear' button on it that will clear the signature if the signer makes an awful mistake, and allow them to re-sign it.
Hiding the annotations won't do that. I want to completely delete them.

Thanks,
Janine
0
 
LVL 8

Accepted Solution

by:
dds110 earned 2000 total points
ID: 16417133
Assuming you are using only 1 object for the annotations, you can use the "DeleteAllInkAnnotations" method.

Here's another example:

Function deleteInk()
ActiveDocument.DeleteAllInkAnnotations
End Function


HTH
0
Independent Software Vendors: 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!

 
LVL 8

Expert Comment

by:dds110
ID: 16417239
Since I don't have a Tablet PC, perhaps you can post an example of a document with Ink Annotations In it for me to research.  I'm sure there's a simple solution to your needs.
0
 

Author Comment

by:janineo
ID: 16417349
That worked great, thanks!

I'm not a Word programmer usually, so i didn't think to look in the ActiveDoument method list!

Many Thanks,
Janine
0
 
LVL 8

Expert Comment

by:dds110
ID: 16417429
Glad I could help.
0

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Question has a verified solution.

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

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.
This article describes some techniques which will make your VBA or Visual Basic Classic code easier to understand and maintain, whether by you, your replacement, or another Experts-Exchange expert.
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…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
Suggested Courses
Course of the Month15 days, 16 hours left to enroll

850 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