Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dispatch.call(selection, "TypeParagraph"); but want a Line break instead of a paragraph. #62

Open
Karleent opened this issue Oct 1, 2024 · 1 comment

Comments

@Karleent
Copy link

Karleent commented Oct 1, 2024

Hi, I have this very old Java script we use at work. When run, it outputs data to a Word file. In the Word file, I want to change the spacing of the lines. Right now, it uses Dispatch.call(selection, "TypeParagraph"), so it returns a new paragraph between the two lines of text, but I want it to return a Line Break.

Here is a sample of the code:

Dispatch.put(alignment, "Alignment", "1");

Dispatch.put(font, "Size", "10");

Dispatch.call(selection, "TypeText", "XXX Proprietary and Confidential Information");

Dispatch.call(selection, "TypeParagraph");

Dispatch.call(selection, "TypeText", "UNCONTROLLED COPY");

Dispatch.call(selection, "TypeParagraph");

Dispatch.put(alignment, "Alignment", "2");

Dispatch.call(selection, "TypeText", XXname_count.elementAt(j));

Dispatch.call(selection, "TypeParagraph");

I don't code much, and I know enough to fumble my way to what I need to get done; this is my first time playing with Java code.

@Karleent
Copy link
Author

Karleent commented Oct 1, 2024

Screenshot 2024-10-01 130604
Screenshot 2024-10-01 130532

I'm looking for the output with out the large space between the 2 lines.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant