0
사용자가보고있는 페이지에 이미지를 배치하고 싶지만 현재 보이는 페이지를 가져 오는 방법이나 스크롤을 픽셀로 찾을 수 없습니다.Microsoft Word에서 스크롤 위치를 얻는 방법
아무도 나에게 어떤 물건과 속성을 줄 수 있는지 알고 있습니까?
사용자가보고있는 페이지에 이미지를 배치하고 싶지만 현재 보이는 페이지를 가져 오는 방법이나 스크롤을 픽셀로 찾을 수 없습니다.Microsoft Word에서 스크롤 위치를 얻는 방법
아무도 나에게 어떤 물건과 속성을 줄 수 있는지 알고 있습니까?
Word 외부에서 Word를 제어하려고합니까? 아니면 통합 된 컨트롤입니까?
난 당신이 원하는 생각 : Object oMissed = doc.Paragraphs[1].Range;
다음이 코드는 InlineShape입니다
, 객체 모양 없습니다. Shape 객체는 텍스트 줄 바꿈 용입니다.
코드 :
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using Word = Microsoft.Office.Interop.Word;
namespace WordAddIn3
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void button1_Click(object sender, EventArgs e)
{
Word.Application wdApp = Globals.ThisAddIn.Application;
Word.Document doc = wdApp.ActiveDocument;
string fileName = "c:\\testimage.jpg"; //the picture file to be inserted
Object oMissed = doc.Paragraphs[1].Range; //the position you want to insert
Object oLinkToFile = false; //default
Object oSaveWithDocument = true;//default
doc.InlineShapes.AddPicture(fileName, ref oLinkToFile, ref oSaveWithDocument, ref oMissed);
}
}
}
마이크로 소프트 : 마찬가지로 HOWTO: How To Get 32-bit Scroll Position During Scroll Messages
, 당신은 How do I get the scroll position from Microsoft Execl에 SO 문제를보고 할 수 있습니다 - 난 그냥 당신에 의해 요청 깨달았다 ..
스크롤하는 동안 내가 두려워하는 데 도움이되지 않습니다. 애플리케이션이 재생되기 전에 사용자가 스크롤했을 수 있습니다. 나는 Execl 응답이 Word 응답으로 이어질 것을 기대했지만 API는 충분히 다른 것처럼 보입니다. –
Gotcha. 내 편집 된 메시지보기. –