Using OLE add Header to MS Word Document in ABAP Program
Dear Friends,
I have a requirement where I want to add Header and Footer to MS Word through OLE in ABAP Program
I am able to open the word document, through OLE,
I am stuck @ the following step.
CALL METHOD OF LO_APPLICATION 'ActiveDocument' = LO_DOCUMENT.
IF SY-SUBRC <> 0. EXIT. ENDIF.
CALL METHOD OF LO_DOCUMENT 'Sections' = LO_SECTIONS.
IF SY-SUBRC <> 0. EXIT. ENDIF.
Please let me know.
Thanks
Rajesh
Hi Rajesh,
You have to use GET PROPERTY & SET PROPERTY attributes of OLE2_OBJECT to use headers.
Just a sample code snippet for your reference :-
DATA : GS_TABLE TYPE OLE2_OBJECT ,
GS_RANGE TYPE OLE2_OBJECT,
GS_CELLTYPE OLE2_OBJECT,
CALL METHOD OF GS_TABLE 'Cell' = gs_cell
EXPORTING #1 = '1'
#2 = '1'.
GET PROPERTY OF gs_cell 'Range' = gs_range.
SET PROPERTY OF gs_range 'Text' = 'VGUID'.
CALL METHOD OF gs_table 'Cell' = gs_cell
EXPORTING #1 = '1'
#2 = '2'.
For more details search on SCN for code on creating MS word document using OLE automation.
Regards
Abhii
Similar Messages
-
Hi:
I have a really annoying problem. command C andV stop working just in Microsoft Word. what should i do?i can't use them as shortcut keys in word documents! however they are working in other applications, the problem is just in word documents!I just had the same thing happen on my Macbook but was able to resolve it (at least for now!). Here's what I did:
Go to Tools>Customize Keyboard
You can then select 'edit' on the left side under categories. Then on the right side, you'll see lots of commands. Scroll down till you find the ones that aren't working. Ex. Editcopy, Editpaste.
Select each one and check to see if there is a command short cut. Ex. for editcopy it should read: "Command C"
If it does not (i.e. the problem), put the cursor in "Press new keyboard shortcut." Then press the command key along with the corresponding letter. Note you will not type the letters out but actually do the command. Then press "Assign." The shortcut command should then appear under 'Current Keys.' Go through and check all of the ones that aren't working for you.
BTW, this is a nifty was to add some cool commands that you use often. Ex. insert row on table, etc.
Quit Word and restart it. It should work. Hope that helps! -
How to read a word in a abap program for syntax check
program for finding keywords:
into a given program name in selection screen.
e.g Parameters Keyword in YXABC propgram.
How to find a word in a abap program for syntax checkHi!
Read table TNAPR for the program names.
Then use the READ REPORT statement for it and load the program into an internal table.
Then loop at the table.
Regards
Tamá -
SAP OLE - Create Hyperling on a Word Document
Hi,
My next step of creating a word document using OLE is to define some hyperlinks on a document. I have ran a macro in word to 'see what it does' when manually creating a hyperlink. Below is the macro: -
ActiveDocument.Hyperlinks.Add Anchor:=Selection.Range, Address:="", _
SubAddress:="_Program_Z_OPEN_HRS_UPD_WRF1", ScreenTip:="", TextToDisplay _
:="This is the program"
I have tried to implement this using ABAP with no success. Maybe because I still dont fully understand how to interprete these marcos as ABAP.
Has anybody created a hyperlink on a word document before, if so, seeing the code would be a great help.
Thanks
Martin
Edited by: Martin Shinks on Dec 21, 2011 9:52 AMNever mind, with a bit of jiggery pokery, I fixed it myself.
-
OLE: Why placeholders of MS Word document are not replaced?
Hi Experts, I am using OLE to create Word Documents within a LOOP. The problem I have is that the Word Documents are created and seved well but the placeholders (&nom_prov') and (&ncod_prov') are not replaces by the values (in the example: test1 and test2).
Anybody can help me in with that issue?
LOOP AT lt_partner1 INTO ls_partner1.
AT FIRST.
CREATE OBJECT zword 'WORD.BASIC'.
CALL METHOD OF zword 'FILEOPEN' EXPORTING #1 = 'C:\DOCS\PRUEBA_1.DOC'.
ENDAT.
CALL METHOD OF zword 'EDITSELECTALL'.
CALL METHOD OF zword 'EDITCOPY'.
CALL METHOD OF zword 'FILENEW'.
CALL METHOD OF zword 'EDITPASTE'.
CALL METHOD OF zword 'STARTOFDOCUMENT'.
CALL METHOD OF zword 'WW2_EDITREPLACE' EXPORTING #1 = '&cod_prov'
#2 = 'test 1'. "ls_partner1-nif.
CALL METHOD OF zword 'WW2_EDITREPLACE' EXPORTING #1 = '&nom_prov'
#2 = 'test 2'. "ls_partner1-name_org1.
CALL METHOD OF zword 'STARTOFDOCUMENT'.
CALL METHOD OF zword 'EDITSELECTALL'.
CALL METHOD OF zword 'EDITCLEAR'.
CALL METHOD OF zword 'EDITPASTE'.
lv_contador = lv_contador + 1.
CONCATENATE 'C:\DOCS\' 'PRUEBA' lv_contador '_' sy-datum '.DOC' INTO lv_file_save_as.
CALL METHOD OF zword 'FILESAVEAS' EXPORTING #1 = lv_file_save_as.
CALL METHOD OF zword 'DOCCLOSE' EXPORTING #1 = 2.
AT LAST.
CALL METHOD OF zword 'APPCLOSE'.
FREE OBJECT zword.
ENDAT.
ENDLOOP.Hello, I have found out what was the problem. In the end I have used method EDITREPLACE and not WW2_EDITREPLACE and I put the method EDITREPLACE more to the end of my ABAP Code:
REPORT z_prueba_oliver.
TYPES: BEGIN OF ty_partner,
nif TYPE bu_partner,
name_org1 TYPE bu_nameor1,
conting_com TYPE c LENGTH 2,
fecha_efecto TYPE zbufecha_ef,
END OF ty_partner.
DATA: lt_partner1 TYPE TABLE OF ty_partner,
ls_partner1 TYPE ty_partner,
lv_file_save_as TYPE c LENGTH 40,
lv_contador TYPE n LENGTH 3.
* Include necesario para la declaracion de objetos OLE2
INCLUDE ole2incl.
* Declaraciones para la llamada a WORD.
DATA zword TYPE ole2_object.
CLEAR zword.
ls_partner1-nif = 'X7510034M'.
ls_partner1-name_org1 = 'Razon Social 1'.
APPEND ls_partner1 TO lt_partner1.
ls_partner1-nif = 'X7510034M'.
ls_partner1-name_org1 = 'Razon Social 2'.
APPEND ls_partner1 TO lt_partner1.
ls_partner1-nif = 'X7510034M'.
ls_partner1-name_org1 = 'Razon Social 3'.
APPEND ls_partner1 TO lt_partner1.
ls_partner1-nif = 'X7510035M'.
ls_partner1-name_org1 = 'Razon Social 4'.
APPEND ls_partner1 TO lt_partner1.
ls_partner1-nif = 'X7510035M'.
ls_partner1-name_org1 = 'Razon Social 5'.
APPEND ls_partner1 TO lt_partner1.
LOOP AT lt_partner1 INTO ls_partner1.
AT FIRST.
CREATE OBJECT zword 'WORD.BASIC'.
* Se abre el fichero que contiene la plantilla de la carta
CALL METHOD OF zword 'FILEOPEN'
EXPORTING
#1 = 'C:DOCSPRUEBA_1.DOC'.
ENDAT.
* Se selecciona todo el texto del archivo PRUEBA_1.DOC
CALL METHOD OF zword 'EDITSELECTALL'.
* Se copia el texto seleccionado al portapapeles
CALL METHOD OF zword 'EDITCOPY'.
* Se crea un documento nuevo, al que WORD llama documento1
CALL METHOD OF zword 'FILENEW'.
* Se pega el texto del portapapeles a documento1
CALL METHOD OF zword 'EDITPASTE'.
* Posicionar al principio del documento
CALL METHOD OF zword 'STARTOFDOCUMENT'.
* Posicionar al principio del documento
CALL METHOD OF zword 'STARTOFDOCUMENT'.
* Se selecciona todo
CALL METHOD OF zword 'EDITSELECTALL'.
* Se borra la selección
CALL METHOD OF zword 'EDITCLEAR'.
* Se incorpora el texto original de PRUEBA_1.DOC
CALL METHOD OF zword 'EDITPASTE'.
*IF ls_partner1-conting_com is initial.*
*CALL METHOD OF zword 'EDITREPLACE'*
*EXPORTING*
*#01 = '#linea2y3#'*
*#02 = 'texttexttexttext'*
*#03 = 0*
*#04 = 0*
*#05 = 0*
*#06 = 0*
*#07 = 0*
*#08 = 0*
*#09 = 0*
*#10 = 1*
*#11 = 0*
*#12 = 1.*
*else.*
*CALL METHOD OF zword 'EDITREPLACE'*
*EXPORTING*
*#01 = '#linea2y3#'*
*#02 = 'texttexttexttext'*
*#03 = 0*
*#04 = 0*
*#05 = 0*
*#06 = 0*
*#07 = 0*
*#08 = 0*
*#09 = 0*
*#10 = 1*
*#11 = 0*
*#12 = 1.*
*ENDIF.*
*CALL METHOD OF zword 'EDITREPLACE'*
*EXPORTING*
*#01 = '#codprov#'*
*#02 = ls_partner1-nif*
*#03 = 0*
*#04 = 0*
*#05 = 0*
*#06 = 0*
*#07 = 0*
*#08 = 0*
*#09 = 0*
*#10 = 1*
*#11 = 0*
*#12 = 1.*
CALL METHOD OF zword 'EDITREPLACE'
EXPORTING
#01 = '#nomprov#'
#02 = ls_partner1-name_org1
#03 = 0
#04 = 0
#05 = 0
#06 = 0
#07 = 0
#08 = 0
#09 = 0
#10 = 1
#11 = 0
#12 = 1.
* Se reemplaza el campo #nomprov# con el valor de la tabla interna.
CALL METHOD OF zword 'EDITREPLACE'
EXPORTING
#01 = '#FECHA_EFECTO#'
#02 = '10 de Junio de 2010'
#03 = 0
#04 = 0
#05 = 0
#06 = 0
#07 = 0
#08 = 0
#09 = 0
#10 = 1
#11 = 0
#12 = 1.
lv_contador = lv_contador + 1.
CONCATENATE 'C:DOCS' 'PRUEBA' lv_contador '_' sy-datum '.DOC' INTO lv_file_save_as.
* Se cierra el documento activo, documento1 con opción de salir sin salvar
CALL METHOD OF zword 'FILESAVEAS' EXPORTING #1 = lv_file_save_as.
* Se cierra el documento activo PRUEBA.DOC con opción salir sin salvar
CALL METHOD OF zword 'DOCCLOSE' EXPORTING #1 = 2.
AT LAST.
* Se cierra WORD
CALL METHOD OF zword 'APPCLOSE'.
* Se libera el objeto ZWORD
FREE OBJECT zword.
ENDAT.
ENDLOOP. -
Dont know how to add or embed a word document or an excel sheet in a Captivate 8 slide
I am developing a Captivate 8 elearning module. I have been trying to embed a word document in a slide and an excel sheet in another slide of this Captivate elearning module but I could not see any option to do this. Please help!!
If the content is online you can use the microsoft office online viewer. Make a web object interaction and put the url below in and add the URL of the document to it, so just replace the URL in the example below.
https://view.officeapps.live.com/op/view.aspx?src=http://examplewebsite.com/document.docx -
Using OLE transfer SAP Graphics into Word Doc
Hi,
Suppose i have a Graphics output.Now i want it to transfer into a Word Document using the OLE/OLE2.whats the procedure to do that.
Kind Regards,Hi,
check this link in this lin explained step by step proccess.
https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/204d1bb8-489d-2910-d0b5-cdddb3227820
And also refer this program RSOLETT1.
Regards
swamy -
Using Hotspot to link to a word document
Hi,
I was wondering does anyone know when I use a hotspot how when somebody can click on the hotspot that a word document or one alike will open once the hot spot has been clicked on.
ThanksWhen you make a hotspot, you can provide the Link in the Properties panel. This is the URL of the file that you want the hotspot to be linked to. You can link to Word documents, but they are not Web documents and won't open in browsers. They would have to be downloaded. (Of course, you have to upload the file to your site, first.)
-
Extract data on specific rows in Excel file and add it to different word document on specific rows
I was wondering about if it's possible to set up some kind of vba for this function. I have one worksheet with different data in. Where it is written the same thing like 1A & 2A And 1B & 2B
And if i could put this information on specific rows in a Word document.
I would like to have all of the different data on row 1 in one specific row in a word sheet for it self and the different data on on row 2 copied into different rows in a new word document if it's possible to do some kind of domino effect of this where it can
run 5000 diffrent rows with this kind of inputs,
Im sorry for the bad explanation i did not really know how to translate it as good as possible, write back if you have any question!
Cell 1A: Bmw Cell 1B: Automatic Cell 1C: Diesel Cell 1D: 2014
Cell 2A: Volvo Cell 2B: Manual Cell 2C: Bensin Cell 2D: 2010Run this code in Excel.
Sub PushToWord()
Dim objWord As New Word.Application
Dim doc As Word.Document
Dim bkmk As Word.Bookmark
sWdFileName = Application.GetOpenFilename(, , , , False)
Set doc = objWord.Documents.Open(sWdFileName)
objWord.activedocument.variables("BrokerFirstName").Value = Range("BrokerFirstName").Value
objWord.activedocument.variables("BrokerLastName").Value = Range("BrokerLastName").Value
ActiveDocument.Fields.Update
objWord.Visible = True
End Sub
You must add a few DocVariables to your Word document. See these links for more information.
http://word.tips.net/T000813_Understanding_Document_Variables.html
https://www.youtube.com/watch?v=aABYENF1bMI
Knowledge is the only thing that I can give you, and still retain, and we are both better off for it. -
Using menu help button to open word document
I want to use the Help button on my menu to open a microsoft word document that has the user manual in it. Is there an easy way to call it from the public void jMenuHelpAbout_actionPerformed(ActionEvent e) method? Thanks.
AllysonI put that code into my code like this:
try {
Runtime runner = Runtime.getRuntime();
Process process = runner.exec("S:\\Project Folders\\rades\\Task2\\FDC UM - Draft2.doc");
catch(Exception p) {
p.printStackTrace();
It compiled, but then give me these errors at runtime:
java.io.IOException: CreateProcess: S:\Project Folders\rades\Task2\FDC UM - Draft2.doc error=2
at java.lang.Win32Process.create(Native Method)
at java.lang.Win32Process.<init>(Win32Process.java:66)
at java.lang.Runtime.execInternal(Native Method)
at java.lang.Runtime.exec(Runtime.java:551)
at java.lang.Runtime.exec(Runtime.java:418)
at java.lang.Runtime.exec(Runtime.java:361)
at java.lang.Runtime.exec(Runtime.java:325)
at helloworld.HelloWorldFrame.jMenuHelpAbout_actionPerformed(HelloWorldFrame.java:123)
at helloworld.HelloWorldFrame$2.actionPerformed(HelloWorldFrame.java:73)
at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1450)
at javax.swing.AbstractButton$ForwardActionEvents.actionPerformed(AbstractButton.java:1504)
at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:378)
at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:250)
at javax.swing.AbstractButton.doClick(AbstractButton.java:279)
at javax.swing.plaf.basic.BasicMenuItemUI$MouseInputHandler.mouseReleased(BasicMenuItemUI.java:886)
at java.awt.Component.processMouseEvent(Component.java:3715)
at java.awt.Component.processEvent(Component.java:3544)
at java.awt.Container.processEvent(Container.java:1164)
at java.awt.Component.dispatchEventImpl(Component.java:2593)
at java.awt.Container.dispatchEventImpl(Container.java:1213)
at java.awt.Component.dispatchEvent(Component.java:2497)
at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:2451)
at java.awt.LightweightDispatcher.processMouseEvent(Container.java:2216)
at java.awt.LightweightDispatcher.dispatchEvent(Container.java:2125)
at java.awt.Container.dispatchEventImpl(Container.java:1200)
at java.awt.Window.dispatchEventImpl(Window.java:914)
at java.awt.Component.dispatchEvent(Component.java:2497)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:339)
at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:131)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:98)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:85)
Any idea on what they mean? Thanks.
Allyson -
Hi All,
I faced an issue regarding insert custom control in Word Document via VSTO. And then I scroll down/up the Word Document. The control which I added is missing.
I used the code below to AddControl in Word Document,
var shape = Globals.Factory.GetVstoObject(_doc).Controls.AddControl(myControl, range, width, height, shapeName).InlineShape.ConvertToShape();
shape.WrapFormat.Type = Word.WdWrapType.wdWrapInline;
I test this on Word 2007 and Word 2013. Both of them have the same result.
Please help me! Thanks a lot!
Ricky!Hi Ricky,
I failed to reproduce your issue on my test environment (Office 2013).
Here is the sample project:
# WordAddCustomControlIssue on OneDrive
Would you mind sharing a sample project through OneDrive to help us reproduce this issue?
Regards,
Jeffrey
We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
Click
HERE to participate the survey. -
Am I able to use my USB and read saved word documents
I am wanting to know if I am able to plug in a standard USB storage device and access saved word documents or PDF's. Can this be done via a connector of some sort.
KatrinaTo expand on what Diavonex has said, here is a good round-up of available devices: http://www.cnet.com/news/wireless-mobile-storage-expander-roundup-frequent-trave lers-youll-want-one-of-these/.
Also, just understand that these storage devices must be accessed using their own iOS apps and are not generally accessible as you would expect on a computer for example. -
Display Word Document in ABAP WebDynpro
Hi All,
We have a number of word documents stored in the Business Document Navigator (Transaction OAOR) that we would like to display within a simple ABAP WebDynpro. Demo program SAPRDEMO_FORM_INTERFACE shows how to retrieve a document from BDS via class cl_bds_document_set. However, I am not seeing a similiar program for ABAP Web Dynpro.
I was hoping that WebDynpro test application IOS_TEST_SIMPLE_MS would do the trick; however that appears to only work for a MIME repository object. Is there a way to display these documents through ABAP WebDynpro? Can anyone point me to a sample program? Thanks.
JohnHi John
Have a look at this thread [ Approach content repository other way then URL approach |Re: Approach content repository other way then URL approach;.
Thomas Jung delivers some (as always) excellent answers to a very similar problem. If the document is in DMS or BDS really doesn't matter so if I were you I would follow the "cached response" path.
Also, do a google-search for -- abap "cached response" -- and you will find some additional links here (Thomas has even more to offer...).
If you do follow this path please share some details as a follow up in this thread for the benefit of the community at large.
Regards, Johan -
How to generate a PDF document from ABAP program
Hi experts,
I have arequirement where in i need to create a PDF document using program. I have all the data collected into tables and i have used the calss CL_FP_PDF_OBJECT.
A pdf document is successfully created, but unable to open it because of some error. I guess some encryption is missing.
As an alternative I have created a smartform and generated its OTF data in my program and created a PDF. This is working fine.
But as per my requirement, i cannot go for a smart form.
Any help to resolve this issue will be highly appreciated.
Thanks & regards,
Asrar Ahamed MA
Infosys Tech. Ltd. INDIAHi Asrar ,
create a report with this Copy and give your program name in the selection screen whose output need to be in PDF.
*report zanusha_spool_to_pdf.
---TABLES----
tables:
tsp01.
---STRUCTURES---
data:
mstr_print_parms like pri_params,
mc_valid(1) type c,
mi_bytecount type i,
mi_length type i,
mi_rqident like tsp01-rqident.
---INTERNAL TABLES---
data:
mtab_pdf like tline occurs 0 with header line,
mc_filename like rlgrap-filename.
---SELECTION SCREEN---
parameters:
p_repid like sy-repid, " Report to execute
p_linsz like sy-linsz default 132, " Line size
p_paart like sy-paart default 'X_65_132'. " Paper Format
start-of-selection.
concatenate 'c:\'
p_repid
'.pdf'
into mc_filename.
*-- Explicitly set line width, and output format so that
*-- the PDF conversion comes out OK
mstr_print_parms-linsz = p_linsz.
mstr_print_parms-paart = p_paart.
*-- Make sure that a printer destination has been set up.
*-- If this is not done the PDF function module ABENDS
if mstr_print_parms-pdest = space.
mstr_print_parms-pdest = 'LOCL'.
endif.
*-- Setup the Print Parmaters
call function 'GET_PRINT_PARAMETERS'
exporting
authority = space
copies = '1'
cover_page = space
data_set = space
department = space
destination = space
expiration = '1'
immediately = space
in_archive_parameters = space
in_parameters = space
layout = space
mode = space
new_list_id = 'X'
no_dialog = 'X'
user = sy-uname
importing
out_parameters = mstr_print_parms
valid = mc_valid
exceptions
archive_info_not_found = 1
invalid_print_params = 2
invalid_archive_params = 3
others = 4.
submit (p_repid) to sap-spool without spool dynpro
spool parameters mstr_print_parms
via selection-screen
and return.
*-- Find out the spool number
perform get_spool_number using sy-repid
sy-uname
changing mi_rqident.
*-- Convert Spool to PDF
call function 'CONVERT_ABAPSPOOLJOB_2_PDF'
exporting
src_spoolid = mi_rqident
no_dialog = space
dst_device = mstr_print_parms-pdest
importing
pdf_bytecount = mi_bytecount
tables
pdf = mtab_pdf
exceptions
err_no_abap_spooljob = 1
err_no_spooljob = 2
err_no_permission = 3
err_conv_not_possible = 4
err_bad_destdevice = 5
user_cancelled = 6
err_spoolerror = 7
err_temseerror = 8
err_btcjob_open_failed = 9
err_btcjob_submit_failed = 10
err_btcjob_close_failed = 11
others = 12.
*-- Download the file
call function 'DOWNLOAD'
exporting
bin_filesize = mi_bytecount
filename = mc_filename
filetype = 'BIN'
importing
act_filename = mc_filename
tables
data_tab = mtab_pdf.
FORM get_spool_number *
Get the most recent spool created by user/report *
--> F_REPID *
--> F_UNAME *
--> F_RQIDENT *
form get_spool_number using f_repid
f_uname
changing f_rqident.
data:
lc_rq2name like tsp01-rq2name.
concatenate f_repid+0(9)
f_uname+0(3)
into lc_rq2name.
select * from tsp01 where rq2name = lc_rq2name
order by rqcretime descending.
f_rqident = tsp01-rqident.
exit.
endselect.
if sy-subrc ne 0.
clear f_rqident.
endif.
endform." get_spool_number
Thanx
Anusha. -
Parking Document Through ABAP Program
Dear Experts,
I need to Park the Account Documents Using ABAP program,
Please Suggest Any FM or Any Example.
please suggest how to use RFBIBL00 program in my abap program. or if any other better way to post document using custom program.
SincerelyAnswered through sdn forums.
Maybe you are looking for
-
Print Services: servername.local is "busy"
We will soon be getting some new Mac OS X 10.6 (Snow Leopard)-only Macs at work. Since AppleTalk is no longer available to these Macs, I thought I'd set-up some Bonjour queues using one of our Mac OS X 10.5.8 Servers. (Of the 20 printers we have only
-
I have 2 IPADS and I want to switch them. How do I do that?
I have 2 IPADS and one is larger than the other. I would like to swap the info on them. How do I go about doing that?
-
Editing non-editable regions as the webmaster
I'm just learning to use Contribute, and I want to enable my client to edit some regions and not others (obviously). But I want to be able to edit the non-editable regions myself, in Dreamweaver. For example, I don't want them to be able to mess with
-
I have a macbook pro, running OS X Yosemite. I plugged in a valid USB and it does not show in Finder? Is there another way to locate it?
-
Buying iPod Classic in UK for foreign user.
I would like to buy an iPod classic in a UK retail store, but the computer/itunes account that will use the iPod will be foreign (EU), will it work? If so what about the warranty and are there other things to keep in mind?