취소
다음에 대한 결과 표시 
다음에 대한 검색 
다음을 의미합니까? 

add caption to MS Word image using activex

해결 완료!
솔루션으로 이동

I used LabVIEW to add an image at a bookmark in a Word document. Now I'm trying to add a caption to that image, but having no luck. I keep getting errors on my InsertCaption method--either "Error -2146824090 occurred at Exception occured in Microsoft Word: Command failed" or Type mismatch, depending on the parameters I use.

 

I've browsed this forum and others, but can only find solutions for those that have the report generation toolkit, which I do not.

 

Code is attached. Any ideas?

 

Justin

0 포인트
1/5 메시지
3,852 조회수

Are you making the caption another bookmark? That's what I would do.

0 포인트
2/5 메시지
3,846 조회수

Yeah, I could do it that way. I'd prefer to use the InsertCaption functionality though--seems cleaner. I suppose if I can't find out how to make this node work, that's what I'll end up doing.

0 포인트
3/5 메시지
3,837 조회수
솔루션
주제 작성자 SIS-justin이(가) 승인함

You need to define your label before using it with the Insert Caption method. You can modify your VI as in the attached picture to add the label you want to use to the CaptionLabels collection. You will then be able to use it.

 

Ben64

 

Wordwriteimage_BD.png

4/5 메시지
3,831 조회수

Beautiful! Works great, thank you!

 

I've attached the working code in case anyone else ever needs something similar...

0 포인트
5/5 메시지
3,825 조회수