[Solved] Inserting header

Using them, Making them , Finding them

[Solved] Inserting header

Postby sid_openoffice_1 » Thu Jul 08, 2010 2:06 pm

Hi,

I want to insert a header using data from a .ott(open document Text Template) file.
I am not getting a way to do this.
My .ott file contains tables too.
So please guide me the way of doing this.
Last edited by sid_openoffice_1 on Thu Jul 15, 2010 3:01 pm, edited 1 time in total.
Windows OpenOffice 3.2
sid_openoffice_1
 
Posts: 12
Joined: Tue Jun 15, 2010 1:53 pm

Re: inserting header

Postby Hagar Delest » Thu Jul 08, 2010 3:52 pm

I fear we need some additional information!

What kind of data do you want to get? A template is used to create a document already pre-formatted so once the template is ready, the documents based on it should be fine from their creation.

If your template contains tables, then your documents get them too.

Can you upload it and tell us what's wrong (see: How to attach a document here)?
AOO 4.1.7 on Xubuntu 19.10 and 4.1.5 on Windows 10 (with winPenPack port).
User avatar
Hagar Delest
Moderator
 
Posts: 28679
Joined: Sun Oct 07, 2007 9:07 pm
Location: France

Re: inserting header

Postby sid_openoffice_1 » Mon Jul 12, 2010 11:12 pm

Actually i want to load that document in the header.
And I am not geting the way to do this.
Windows OpenOffice 3.2
sid_openoffice_1
 
Posts: 12
Joined: Tue Jun 15, 2010 1:53 pm

Re: Inserting header

Postby TheGurkha » Mon Jul 12, 2010 11:30 pm

You're going to have to give us more to work with!

Please tell us in more detail what you want to achieve, and what you have tried.
Ubuntu 14.10 Utopic Unicorn, LibreOffice Version: 4.3.3.2
Gurkha Welfare Trust
User avatar
TheGurkha
Volunteer
 
Posts: 6482
Joined: Thu Mar 13, 2008 12:13 pm
Location: North Wales, UK.

Re: inserting header

Postby keme » Mon Jul 12, 2010 11:33 pm

sid_openoffice_1 wrote:Actually i want to load that document in the header.
And I am not geting the way to do this.

That does not clarify anything. To provide any help, we need the following:
The document(s) you are working with (remove any sensitive data first). See link above for help with attaching files.
Tell us what you want to achieve.
Preferably, tell us what you have done (if you have gotten anywhere at all with this), and what result you got.
Apache OO 3.4.1/4.1.2/4.1.3, on Ms Windows 7/10 and Mac OS-X 10.8.5 and 10.11.
LibreOffice 4.3.3.2 on Mepis Antix MX 14
User avatar
keme
Volunteer
 
Posts: 3296
Joined: Wed Nov 28, 2007 10:27 am
Location: Egersund, Norway

Re: inserting header

Postby sid_openoffice_1 » Tue Jul 13, 2010 12:22 pm

Hi,

Please find the 2 attachment with this in which one is my code file and the other is the .ott file.
I want to insert the "TimeOffRequestForm.ott" file into the header.Is there a possibility of doing this?If yes please guide me how to do it.

Regards
Siddharth
Genpact
India
Attachments
TimeOffRequestForm.ott
this is the template file whch is to be used
(15.6 KiB) Downloaded 206 times
header inserting file.odt
this is my code file in c#.I want to insert the "TimeOffRequestForm.ott" file into the header.Is there a possibility of doing this?If yes please guide me how to do it.
(17.88 KiB) Downloaded 198 times
Windows OpenOffice 3.2
sid_openoffice_1
 
Posts: 12
Joined: Tue Jun 15, 2010 1:53 pm

Re: Inserting header

Postby Zizi64 » Tue Jul 13, 2010 12:42 pm

In my opinion that .ott file not contain any header. It might be called "Cover Page"

Why not you copy-paste your document into .ott file? Just type Ctrl-Enter in .ott file, and at beginning of second page paste the all text from .odt file, and on .ott file: save as...
Tibor Kovacs, Hungary; LO6.1.6, 6.2.8 /Win7-10 x64Prof.
PortableApps/winPenPack: LO3.3.0-6.4.0; AOO4.1.6
Please, edit the initial post in the topic: add the word [Solved] at the beginning of the subject line - if your problem has been solved.
User avatar
Zizi64
Volunteer
 
Posts: 8771
Joined: Wed May 26, 2010 7:55 am
Location: Budapest, Hungary

Re: Inserting header

Postby sid_openoffice_1 » Wed Jul 14, 2010 8:33 am

Hi,

Thanks for the reply bt i have to do that programmatically and in this i have to insert that .ott file into the header.

Regards.
Windows OpenOffice 3.2
sid_openoffice_1
 
Posts: 12
Joined: Tue Jun 15, 2010 1:53 pm

Re: Inserting header

Postby RoryOF » Wed Jul 14, 2010 8:44 am

So long as your TimeOffRequest form is visible, does it matter if it is in the header, or on the first page?
Apache OpenOffice 4.1.7 on Xubuntu 18.04.4 (mostly 64 bit version) and very infrequently on Win2K/XP
User avatar
RoryOF
Moderator
 
Posts: 30407
Joined: Sat Jan 31, 2009 9:30 pm
Location: Ireland

Re: Inserting header

Postby Zizi64 » Wed Jul 14, 2010 9:34 am

Hi, sid_openoffice_1

An appropriate solution would be for you the following proposal?

Idea:
Automated autotext function

description:
First, highlight the text in the template file.
Pick up one into the "Autotext" function (Edit ->Autotext -> ...)
(I picked up named as "TORForm" with short name "T" in my OpenOffice.

The recorded macro will insert the into the (new) first page of the document.
On first page the macro will insert the autotext item named "T".

(The recorded macro stored in the BASIC repository of this document. You need to store into OpenOffice BASIC repository. Associate the macro to a new menu or the toolbar is a new element, then it will be always available.

(You can develop the macro. For example, to set the new first page to "First Page" pagestyle)

Code: Select all   Expand viewCollapse view
REM  *****  BASIC  *****
Option Explicit

sub InsertFirstPage
rem ----------------------------------------------------------------------
rem define variables
dim document   as object
dim dispatcher as object
rem ----------------------------------------------------------------------
rem get access to the document
document   = ThisComponent.CurrentController.Frame
dispatcher = createUnoService("com.sun.star.frame.DispatchHelper")

rem ----------------------------------------------------------------------
dispatcher.executeDispatch(document, ".uno:GoToStartOfDoc", "", 0, Array())

rem ----------------------------------------------------------------------
dispatcher.executeDispatch(document, ".uno:InsertPagebreak", "", 0, Array())

rem ----------------------------------------------------------------------
dispatcher.executeDispatch(document, ".uno:GoToStartOfDoc", "", 0, Array())

rem ----------------------------------------------------------------------
dim args6(0) as new com.sun.star.beans.PropertyValue
args6(0).Name = "Group"
args6(0).Value = "mytexts*1"

dispatcher.executeDispatch(document, ".uno:SetActGlossaryGroup", "", 0, args6())

rem ----------------------------------------------------------------------
dim args7(1) as new com.sun.star.beans.PropertyValue
args7(0).Name = "Group"
args7(0).Value = "mytexts*1"
args7(1).Name = "ShortName"
args7(1).Value = "T"

dispatcher.executeDispatch(document, ".uno:InsertGlossary", "", 0, args7())

end sub


header inserting file.odt
(19 KiB) Downloaded 210 times
Tibor Kovacs, Hungary; LO6.1.6, 6.2.8 /Win7-10 x64Prof.
PortableApps/winPenPack: LO3.3.0-6.4.0; AOO4.1.6
Please, edit the initial post in the topic: add the word [Solved] at the beginning of the subject line - if your problem has been solved.
User avatar
Zizi64
Volunteer
 
Posts: 8771
Joined: Wed May 26, 2010 7:55 am
Location: Budapest, Hungary


Return to Templates

Who is online

Users browsing this forum: No registered users and 1 guest